summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-04-25 11:15:46 +0300
committerMichal Domonkos <mdomonko@redhat.com>2022-07-01 10:52:14 +0200
commit4ce99c8f133575b58b7e83f67b1c71cb24e5b4bb (patch)
treee1488b0ad08bcc448cbd9102a0c818e4dc3614c6
parent81f14afdf66a9817fa724493e171324d0eb8f702 (diff)
downloadrpm-4ce99c8f133575b58b7e83f67b1c71cb24e5b4bb.tar.gz
Add test for colored file upgrade/reinstall
One of the situations which commit a7ceb572cfe1066a6dc425a272ed6b99747eaccc did not cover proved out to be lethal... (cherry picked from commit 6ee7cec81cc0b757efff14ef77c9c7ac13a91e27)
-rw-r--r--tests/rpme.at43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/rpme.at b/tests/rpme.at
index f46d64a6b..e253241cf 100644
--- a/tests/rpme.at
+++ b/tests/rpme.at
@@ -25,6 +25,49 @@ missing d /usr/share/doc/hello-2.0/README
[])
AT_CLEANUP
+AT_SETUP([rpm reinstall with shared files])
+AT_KEYWORDS([install erase update rpmdb])
+RPMDB_INIT
+AT_CHECK([
+runroot rpm -U --ignoreos --ignorearch --nodeps \
+ --define "_transaction_color 3" \
+ --define "_prefer_color 2" \
+ /data/RPMS/hello-2.0-1.x86_64.rpm \
+ /data/RPMS/hello-2.0-1.i686.rpm
+runroot rpm -Vv --nodeps --nogroup --nouser hello.i686 hello.x86_64
+
+runroot rpm --reinstall --ignoreos --ignorearch --nodeps \
+ --define "_transaction_color 3" \
+ --define "_prefer_color 2" \
+ /data/RPMS/hello-2.0-1.x86_64.rpm \
+ /data/RPMS/hello-2.0-1.i686.rpm
+runroot rpm -Vv --nodeps --nogroup --nouser hello.i686 hello.x86_64
+],
+[0],
+[......... /usr/bin/hello (wrong color)
+......... /usr/share/doc/hello-2.0
+......... d /usr/share/doc/hello-2.0/COPYING
+......... d /usr/share/doc/hello-2.0/FAQ
+......... d /usr/share/doc/hello-2.0/README
+......... /usr/bin/hello
+......... /usr/share/doc/hello-2.0
+......... d /usr/share/doc/hello-2.0/COPYING
+......... d /usr/share/doc/hello-2.0/FAQ
+......... d /usr/share/doc/hello-2.0/README
+......... /usr/bin/hello (wrong color)
+......... /usr/share/doc/hello-2.0
+......... d /usr/share/doc/hello-2.0/COPYING
+......... d /usr/share/doc/hello-2.0/FAQ
+......... d /usr/share/doc/hello-2.0/README
+......... /usr/bin/hello
+......... /usr/share/doc/hello-2.0
+......... d /usr/share/doc/hello-2.0/COPYING
+......... d /usr/share/doc/hello-2.0/FAQ
+......... d /usr/share/doc/hello-2.0/README
+],
+[])
+AT_CLEANUP
+
AT_SETUP([rpm -e and shared files removed 1.1])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT