summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-02-28 10:31:28 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-02-28 10:36:10 +0200
commit4e207bfdfce434a6484babc14fe86aeadeec5329 (patch)
treef12429f52a3c85abd8c9463e3bad2d4655f1590d
parent2a4333c18e0000031ed1d542ba7a6fffe1360c08 (diff)
downloadrpm-4e207bfdfce434a6484babc14fe86aeadeec5329.tar.gz
rpm-4e207bfdfce434a6484babc14fe86aeadeec5329.tar.bz2
rpm-4e207bfdfce434a6484babc14fe86aeadeec5329.zip
Unbreak rpm -V output (RhBug:797964)
- Commit ac0ab016a5ec31e65eb0c0910a5a6f1199aae3e7 unintentionally changed the order of the problems shown in verify strings due to a dumb oversight (greetings to self, duh). In other words, this fixes a verify output regression in rpm >= 4.9.x by restoring the long-standing (and documented) order of the verify output chars. - Also fix the testcase which unfortunately was only added after the output-changing commit so it didn't catch the breakage either :-/
-rw-r--r--lib/verify.c8
-rw-r--r--tests/rpmverify.at2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/verify.c b/lib/verify.c
index 35612fe4b..1edb27f16 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -292,14 +292,14 @@ char * rpmVerifyString(uint32_t verifyResult, const char *pad)
{
char *fmt = NULL;
rasprintf(&fmt, "%s%s%s%s%s%s%s%s%s",
- _verifyfile(RPMVERIFY_FILEDIGEST, "5", pad),
_verify(RPMVERIFY_FILESIZE, "S", pad),
- _verifylink(RPMVERIFY_LINKTO, "L", pad),
- _verify(RPMVERIFY_MTIME, "T", pad),
+ _verify(RPMVERIFY_MODE, "M", pad),
+ _verifyfile(RPMVERIFY_FILEDIGEST, "5", pad),
_verify(RPMVERIFY_RDEV, "D", pad),
+ _verifylink(RPMVERIFY_LINKTO, "L", pad),
_verify(RPMVERIFY_USER, "U", pad),
_verify(RPMVERIFY_GROUP, "G", pad),
- _verify(RPMVERIFY_MODE, "M", pad),
+ _verify(RPMVERIFY_MTIME, "T", pad),
_verify(RPMVERIFY_CAPS, "P", pad));
return fmt;
diff --git a/tests/rpmverify.at b/tests/rpmverify.at
index dd23a4a39..77d6bfe00 100644
--- a/tests/rpmverify.at
+++ b/tests/rpmverify.at
@@ -79,7 +79,7 @@ dd if=/dev/zero of="${RPMTEST}"/usr/local/bin/hello \
runroot rpm -Va --nodeps --nouser --nogroup
],
[1],
-[5..T...M. /usr/local/bin/hello
+[.M5....T. /usr/local/bin/hello
missing d /usr/share/doc/hello-1.0/FAQ
],
[])