Use RPMTAG_FILEDIGESTS instead of MD5S internally
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 30 May 2008 11:14:17 +0000 (14:14 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 2 Jun 2008 06:50:49 +0000 (09:50 +0300)
- no functional changes

build/files.c
lib/query.c
lib/rpmdb.c
lib/rpmfi.c

index 47ad289..2e6cc57 100644 (file)
@@ -1122,8 +1122,8 @@ static void genCpioListAndHeader(FileList fl,
            (void) rpmDoDigest(PGPHASHALGO_MD5, flp->diskPath, 1, 
                               (unsigned char *)buf, NULL);
        s = buf;
-       (void) headerAddOrAppendEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE,
-                              &s, 1);
+       (void) headerAddOrAppendEntry(h, RPMTAG_FILEDIGESTS, 
+                                     RPM_STRING_ARRAY_TYPE, &s, 1);
        
        buf[0] = '\0';
        if (S_ISLNK(flp->fl_mode)) {
index 6025c93..cf96153 100644 (file)
@@ -423,7 +423,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
         for (i = 0, t = MD5, s = arg; i < 16; i++, t++, s += 2)
             *t = (rnibble(s[0]) << 4) | rnibble(s[1]);
 
-       qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_FILEMD5S, MD5, sizeof(MD5));
+       qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_FILEDIGESTS, MD5, sizeof(MD5));
        if (qva->qva_mi == NULL) {
            rpmlog(RPMLOG_NOTICE, _("no package matches %s: %s\n"),
                        "fileid", arg);
index 6a3799e..cb4ce55 100644 (file)
@@ -2367,7 +2367,7 @@ static int td2key(rpmtd tagdata, DBT *key)
     case RPM_I18NSTRING_TYPE:
     case RPM_STRING_ARRAY_TYPE:
        str = rpmtdGetString(tagdata);
-       if (rpmtdTag(tagdata) == RPMTAG_FILEMD5S) {
+       if (rpmtdTag(tagdata) == RPMTAG_FILEDIGESTS) {
            uint8_t * t = bin;
            /* Filter out empty MD5 strings. */
            if (!(str && *str != '\0'))
index e5c3c24..fd4c3bb 100644 (file)
@@ -1281,7 +1281,7 @@ if (fi->actions == NULL)
     fi->digestalgo = PGPHASHALGO_MD5;
     fi->digests = NULL;
     /* grab hex digests from header and store in binary format */
-    if (headerGet(h, RPMTAG_FILEMD5S, &fdigests, HEADERGET_MINMEM)) {
+    if (headerGet(h, RPMTAG_FILEDIGESTS, &fdigests, HEADERGET_MINMEM)) {
        const char *fdigest;
        size_t diglen = rpmDigestLength(fi->digestalgo);
        fi->digests = t = xmalloc(rpmtdCount(&fdigests) * diglen);