Unbreak rpm -V output (RhBug:797964)
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 08:31:28 +0000 (10:31 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 28 Feb 2012 08:36:10 +0000 (10:36 +0200)
- 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 :-/

lib/verify.c
tests/rpmverify.at

index 35612fe..1edb27f 100644 (file)
@@ -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;
index dd23a4a..77d6bfe 100644 (file)
@@ -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
 ],
 [])