summaryrefslogtreecommitdiff
path: root/tests/rpmreplace.at
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-08-24 13:36:52 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-08-24 13:36:52 +0300
commita7a06ec88f7183953499456afc4c41aee6bd7c14 (patch)
tree12488b46fe7eff2fc50e895ac47dfb6a0dbe3385 /tests/rpmreplace.at
parent00d82f1322c6dbf471f61bca7a5cc347fc2fca0a (diff)
downloadrpm-a7a06ec88f7183953499456afc4c41aee6bd7c14.tar.gz
rpm-a7a06ec88f7183953499456afc4c41aee6bd7c14.tar.bz2
rpm-a7a06ec88f7183953499456afc4c41aee6bd7c14.zip
Detect attempts to replace directory symlink to directory in package
- Rpm cannot currently *correctly* deal with directory symlink changing to a directory through updates, detect early and abort with conflicts instead of proceeding with known-broken results: previously these would seemingly succeed but without actually doing the requested changes, and leaving orphans on the disk. Far less evil than the directory replacement failure but incorrect anyway. - Same %pretrans wackiness as with directory replacements applies here. - Adjust test-suite to match the new behavior. - It's possible there are packages that have been relying on the former broken "success" results, so this might need further fine-tuning...
Diffstat (limited to 'tests/rpmreplace.at')
-rw-r--r--tests/rpmreplace.at7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/rpmreplace.at b/tests/rpmreplace.at
index 97707a65f..cdc8d03d9 100644
--- a/tests/rpmreplace.at
+++ b/tests/rpmreplace.at
@@ -301,7 +301,6 @@ test -d "${tf}"
[])
AT_CLEANUP
-# XXX: this "succeeds" but with bogus results
AT_SETUP([upgrade directory link to directory])
AT_KEYWORDS([install])
AT_CHECK([
@@ -325,12 +324,12 @@ runroot rpmbuild --quiet -bb \
runroot rpm -U "${TOPDIR}"/RPMS/noarch/replacetest-1.0-1.noarch.rpm
readlink "${tf}"
runroot rpm -U "${TOPDIR}"/RPMS/noarch/replacetest-2.0-1.noarch.rpm
-test -d "${tf}"
],
-[0],
+[2],
[zoo
],
-[])
+[ file /opt/foo from install of replacetest-2.0-1.noarch conflicts with file from package replacetest-1.0-1.noarch
+])
AT_CLEANUP
AT_SETUP([upgrade empty directory to empty directory])