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