summaryrefslogtreecommitdiff
path: root/tests/basic-test.sh
diff options
context:
space:
mode:
authorJonathan Lebon <jlebon@redhat.com>2017-10-10 18:14:10 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2017-10-14 13:19:18 +0000
commit950318936286b1b1ffcc2894a846af447e8dab12 (patch)
tree4c87dd29ae7a902233903d36cd78f104ac15ce44 /tests/basic-test.sh
parent2a9c5efe1d10b79681b0ee638994ead375be6597 (diff)
downloadostree-950318936286b1b1ffcc2894a846af447e8dab12.tar.gz
lib/checkout: fallback to checksum for UNION_IDENTICAL
There's a subtle issue going on with the way we use `UNION_IDENTICAL` now in rpm-ostree. Basically, the crux of the issue is that we checkout the whole tree from the system repo, but then overlay packages by checking out from the pkgcache repo. This is an easy way to break the assumption that we will be merging hardlinks from the same repo. This ends up causing issues like: https://github.com/projectatomic/rpm-ostree/issues/1047 There, `vim-minimal` is already part of the host and has an object for `/usr/share/man/man1/ex.1.gz`. `vim-common` has that same file, but because it's unpacked in the pkgcache repo first, the hardlinks are not the same. There are a few ways we *could* work around this in rpm-ostree itself, e.g. by re-establishing hardlinks when we do the content pull into the system repo, but it still felt somewhat hacky. Let's just do this the proper way and fall back to checksumming the target file if needed, which is what librpm does as well in this case. Note that we only checksum if they're not hard links, but they're the same size. Closes: #1258 Approved by: cgwalters
Diffstat (limited to 'tests/basic-test.sh')
-rw-r--r--tests/basic-test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
index 3abefd10..9c22fe34 100644
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -546,6 +546,12 @@ for x in $(seq 3); do
assert_file_has_content union-identical-test/usr/share/licenses/${v} GPL
done
done
+# now checkout the first pkg in force copy mode to make sure we can checksum
+rm union-identical-test -rf
+$OSTREE checkout --force-copy union-identical-pkg1 union-identical-test
+for x in 2 3; do
+ $OSTREE checkout ${CHECKOUT_H_ARGS} --union-identical union-identical-pkg${x} union-identical-test
+done
echo "ok checkout union identical merges"
# Make conflicting packages, one with regfile, one with symlink