Skip to content

Commit

Permalink
tests: Fix rsync of base rpmdb with sqlite
Browse files Browse the repository at this point in the history
Apparently small rpmdb changes can cause the size to stay the
same due to preallocation, and rsync defaults to skipping files
based on (name, size, mtime).  It's really ostree's mtime canonicalization
that's unfortunate here.

Anyways, we obviously don't care about performance here so use
`-I` to disable that rsync check.

(Also remove the `mkdir -p` since it's not necessary since a long time)

Closes: coreos#2435
  • Loading branch information
cgwalters committed Jan 8, 2021
1 parent 4b233da commit b82f30e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/common/libvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,7 @@ vm_ostree_repo_commit_layered_as_base() {
vm_shell_inline_sysroot_rw <<EOF
ostree checkout --repo=$repo -H --fsync=no $from_rev $d
# need to update the base rpmdb
mkdir -p $d/usr/lib/sysimage/rpm-ostree-base-db
rsync -qa --delete $d/usr/share/rpm/ $d/usr/lib/sysimage/rpm-ostree-base-db
rsync -qIa --delete $d/usr/share/rpm/ $d/usr/lib/sysimage/rpm-ostree-base-db/
ostree commit --repo=$repo -b $to_ref --link-checkout-speedup --fsync=no --consume $d
# and inject pkglist metadata
rpm-ostree testutils inject-pkglist $repo $to_ref >/dev/null
Expand Down

0 comments on commit b82f30e

Please sign in to comment.