1 # rpmconflict.at: rpm file conflict tests
3 AT_BANNER([RPM file conflicts])
5 # ------------------------------
6 # (Build and) install conflicting package (should fail)
7 AT_SETUP([rpm -U to package with file conflict])
13 for p in "one" "two"; do
14 run rpmbuild --quiet -bb \
16 --define "filedata $p" \
17 ${RPMDATA}/SPECS/conflicttest.spec
20 runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflictone-1.0-1.noarch.rpm
21 runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
28 # ------------------------------
29 # Install conflicting packages in same transaction (should fail)
30 AT_SETUP([rpm -U two packages with a conflicting file])
31 AT_KEYWORDS([install])
36 "${TOPDIR}"/RPMS/noarch/conflictone-1.0-1.noarch.rpm \
37 "${TOPDIR}"/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
44 # ------------------------------
45 # (Build and) install package with shareable file
46 AT_SETUP([rpm -U package with shareable file])
47 AT_KEYWORDS([install])
52 for p in "one" "two"; do
53 run rpmbuild --quiet -bb \
55 --define "filedata same_stuff" \
56 ${RPMDATA}/SPECS/conflicttest.spec
59 runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflictone-1.0-1.noarch.rpm
60 runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
67 # ------------------------------
68 # Install packages with shareable file in same transaction
69 AT_SETUP([rpm -U two packages with shareable file])
70 AT_KEYWORDS([install])
75 "${TOPDIR}"/RPMS/noarch/conflictone-1.0-1.noarch.rpm \
76 "${TOPDIR}"/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
84 # ------------------------------
85 # Replace directory with symlink, this is expected to fail
86 AT_SETUP([rpm -U replacing directory with symlink])
87 AT_KEYWORDS([install])
91 rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
93 run rpmbuild --quiet -bb \
94 --define "rel 1" --without symlink ${RPMDATA}/SPECS/symlinktest.spec
95 run rpmbuild --quiet -bb \
96 --define "rel 2" --with symlink ${RPMDATA}/SPECS/symlinktest.spec
98 runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-1.noarch.rpm
99 runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
103 [error: unpacking of archive failed on file /usr/share/symlinktest: cpio: rename failed - Is a directory
107 # ------------------------------
108 # Replace symlink with a directory - the upgrade succeeds but leaves an
109 # orphan directory that the symlink now points to. Should verify the
110 # result more carefully...
111 AT_SETUP([rpm -U replacing symlink with directory])
112 AT_KEYWORDS([install])
116 rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
118 run rpmbuild --quiet -bb \
119 --define "rel 1" --with symlink ${RPMDATA}/SPECS/symlinktest.spec
120 run rpmbuild --quiet -bb \
121 --define "rel 2" --without symlink ${RPMDATA}/SPECS/symlinktest.spec
123 runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-1.noarch.rpm
124 runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm