summaryrefslogtreecommitdiff
path: root/tests/rpmconflict.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/rpmconflict.at
parent00d82f1322c6dbf471f61bca7a5cc347fc2fca0a (diff)
downloadrpm-a7a06ec88f7183953499456afc4c41aee6bd7c14.tar.gz
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/rpmconflict.at')
-rw-r--r--tests/rpmconflict.at9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/rpmconflict.at b/tests/rpmconflict.at
index 5058c58c6..692e294c9 100644
--- a/tests/rpmconflict.at
+++ b/tests/rpmconflict.at
@@ -259,9 +259,7 @@ runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
AT_CLEANUP
# ------------------------------
-# Replace symlink with a directory - the upgrade succeeds but leaves an
-# orphan directory that the symlink now points to. Should verify the
-# result more carefully...
+# Replace symlink with a directory
AT_SETUP([rpm -U replacing symlink with directory])
AT_KEYWORDS([install])
AT_CHECK([
@@ -278,7 +276,8 @@ runroot rpmbuild --quiet -bb \
runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-1.noarch.rpm
runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
],
-[0],
+[2],
[],
-[])
+[ file /usr/share/symlinktest from install of symlinktest-1.0-2.noarch conflicts with file from package symlinktest-1.0-1.noarch
+])
AT_CLEANUP