|
|
2ff057 |
# rpmconflict.at: rpm file conflict tests
|
|
|
2ff057 |
|
|
|
2ff057 |
AT_BANNER([RPM implicit file conflicts])
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# (Build and) install conflicting package (should fail)
|
|
|
2ff057 |
AT_SETUP([package with file conflict])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
|
|
|
2ff057 |
for p in "one" "two"; do
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "pkg $p" \
|
|
|
2ff057 |
--define "filedata $p" \
|
|
|
2ff057 |
/data/SPECS/conflicttest.spec
|
|
|
2ff057 |
done
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/conflictone-1.0-1.noarch.rpm
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[1],
|
|
|
2ff057 |
[ignore],
|
|
|
2ff057 |
[ignore])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# Install conflicting packages in same transaction (should fail)
|
|
|
2ff057 |
AT_SETUP([two packages with a conflicting file])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U \
|
|
|
2ff057 |
/build/RPMS/noarch/conflictone-1.0-1.noarch.rpm \
|
|
|
2ff057 |
/build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[2],
|
|
|
2ff057 |
[ignore],
|
|
|
2ff057 |
[ignore])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# (Build and) install package with shareable file
|
|
|
2ff057 |
AT_SETUP([package with shareable file])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
|
|
|
2ff057 |
for p in "one" "two"; do
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "pkg $p" \
|
|
|
2ff057 |
--define "filedata same_stuff" \
|
|
|
2ff057 |
/data/SPECS/conflicttest.spec
|
|
|
2ff057 |
done
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/conflictone-1.0-1.noarch.rpm
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[ignore],
|
|
|
2ff057 |
[ignore])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# Install packages with shareable file in same transaction
|
|
|
2ff057 |
AT_SETUP([two packages with shareable file])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U \
|
|
|
2ff057 |
/build/RPMS/noarch/conflictone-1.0-1.noarch.rpm \
|
|
|
2ff057 |
/build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[ignore],
|
|
|
2ff057 |
[ignore])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# (Build and) install package with identical basename in different directories
|
|
|
2ff057 |
AT_SETUP([non-conflicting identical basenames])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
|
|
|
2ff057 |
rm -rf "${RPMTEST}"/opt/mydir
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# (Build and) install package with a self-conflict due to directory symlinks
|
|
|
2ff057 |
AT_SETUP([conflicting identical basenames])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
|
|
|
2ff057 |
rm -rf "${RPMTEST}"/opt/mydir
|
|
|
2ff057 |
mkdir -p "${RPMTEST}"/opt/mydir/one
|
|
|
2ff057 |
ln -s one "${RPMTEST}"/opt/mydir/two
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[1],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /opt/mydir/two/somefile conflicts between attempted installs of selfconflict-1.0-1.noarch and selfconflict-1.0-1.noarch
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 64bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 64bit 1])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
normal,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 64bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 64bit 2])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[normal,normal,normal,normal,normal,
|
|
|
2ff057 |
wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
normal,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 64bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 64bit 3])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.x86_64
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[normal,normal,normal,normal,normal,
|
|
|
2ff057 |
wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
normal,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 32bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 32bit 1])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 1" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[normal,normal,normal,normal,normal,
|
|
|
2ff057 |
wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 32bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 32bit 2])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 1" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 1" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[normal,normal,normal,normal,normal,
|
|
|
2ff057 |
normal,normal,normal,normal,normal,
|
|
|
2ff057 |
wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored files, prefer 32bit
|
|
|
2ff057 |
AT_SETUP([multilib elf conflict, prefer 32bit 3])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 1" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.x86_64
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 1" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.i686.rpm
|
|
|
2ff057 |
runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[0],
|
|
|
2ff057 |
[normal,normal,normal,normal,normal,
|
|
|
2ff057 |
normal,normal,normal,normal,normal,
|
|
|
2ff057 |
wrong color,normal,normal,normal,normal,
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# File conflict between colored and non-colored file 1
|
|
|
2ff057 |
AT_SETUP([multilib elf vs non-elf file conflict 1])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm \
|
|
|
2ff057 |
/build/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[2],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /usr/bin/hello conflicts between attempted installs of hello-2.0-1.x86_64 and hello-script-1.0-1.noarch
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# File conflict between colored and non-colored file 2
|
|
|
2ff057 |
AT_SETUP([multilib elf vs non-elf file conflict 2])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/build/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[1],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /usr/bin/hello from install of hello-script-1.0-1.noarch conflicts with file from package hello-2.0-1.x86_64
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# File conflict between colored and non-colored file 3
|
|
|
2ff057 |
AT_SETUP([multilib elf vs non-elf file conflict 3])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/build/RPMS/noarch/hello-script-1.0-1.noarch.rpm
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U --ignoreos --ignorearch --nodeps \
|
|
|
2ff057 |
--define "_transaction_color 3" \
|
|
|
2ff057 |
--define "_prefer_color 2" \
|
|
|
2ff057 |
/data/RPMS/hello-2.0-1.x86_64.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[1],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /usr/bin/hello from install of hello-2.0-1.x86_64 conflicts with file from package hello-script-1.0-1.noarch
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# Removal conflict on directory -> symlink change
|
|
|
2ff057 |
AT_SETUP([replacing directory with symlink])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "rel 1" --without symlink /data/SPECS/symlinktest.spec
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "rel 2" --with symlink /data/SPECS/symlinktest.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-1.noarch.rpm
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[2],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /usr/share/symlinktest from install of symlinktest-1.0-2.noarch conflicts with file from package symlinktest-1.0-1.noarch
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# Replace symlink with a directory
|
|
|
2ff057 |
AT_SETUP([replacing symlink with directory])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
rm -rf "${TOPDIR}"
|
|
|
2ff057 |
rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "rel 1" --with symlink /data/SPECS/symlinktest.spec
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "rel 2" --without symlink /data/SPECS/symlinktest.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-1.noarch.rpm
|
|
|
2ff057 |
runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[2],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[ file /usr/share/symlinktest from install of symlinktest-1.0-2.noarch conflicts with file from package symlinktest-1.0-1.noarch
|
|
|
2ff057 |
])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|
|
|
2ff057 |
# ------------------------------
|
|
|
2ff057 |
# Regular file shared with a ghost, does not conflict
|
|
|
2ff057 |
# Regular file should be created and not removed when the ghost is removed
|
|
|
2ff057 |
AT_SETUP([real file with shared ghost])
|
|
|
2ff057 |
AT_KEYWORDS([install])
|
|
|
2ff057 |
AT_CHECK([
|
|
|
2ff057 |
RPMDB_CLEAR
|
|
|
2ff057 |
RPMDB_INIT
|
|
|
2ff057 |
fn="${RPMTEST}"/usr/share/my.version
|
|
|
2ff057 |
rm -rf "${TOPDIR}" "${fn}"
|
|
|
2ff057 |
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "pkg one" --define "filedata one" \
|
|
|
2ff057 |
/data/SPECS/conflicttest.spec
|
|
|
2ff057 |
runroot rpmbuild --quiet -bb \
|
|
|
2ff057 |
--define "pkg two" --define "filedata two" --define "fileattr %ghost"\
|
|
|
2ff057 |
/data/SPECS/conflicttest.spec
|
|
|
2ff057 |
|
|
|
2ff057 |
test ! -f "${fn}" && echo OK
|
|
|
2ff057 |
runroot rpm -U \
|
|
|
2ff057 |
/build/RPMS/noarch/conflictone-1.0-1.noarch.rpm \
|
|
|
2ff057 |
/build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
|
|
2ff057 |
cat "${fn}"
|
|
|
2ff057 |
runroot rpm -e conflicttwo
|
|
|
2ff057 |
cat "${fn}"
|
|
|
2ff057 |
runroot rpm -e conflictone
|
|
|
2ff057 |
test ! -f "${fn}" && echo OK
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[],
|
|
|
2ff057 |
[OK
|
|
|
2ff057 |
one
|
|
|
2ff057 |
one
|
|
|
2ff057 |
OK
|
|
|
2ff057 |
],
|
|
|
2ff057 |
[])
|
|
|
2ff057 |
AT_CLEANUP
|
|
|
2ff057 |
|