diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 27 | ||||
-rw-r--r-- | lib/depends.h | 3 | ||||
-rw-r--r-- | lib/fprint.c | 6 | ||||
-rw-r--r-- | lib/header.c | 50 | ||||
-rw-r--r-- | lib/install.c | 10 | ||||
-rw-r--r-- | lib/misc.c | 24 | ||||
-rw-r--r-- | lib/query.c | 6 | ||||
-rw-r--r-- | lib/rpmdb.c | 16 | ||||
-rw-r--r-- | lib/rpmlib.h | 12 | ||||
-rw-r--r-- | lib/transaction.c | 36 | ||||
-rw-r--r-- | lib/uninstall.c | 6 | ||||
-rw-r--r-- | lib/verify.c | 8 |
12 files changed, 122 insertions, 82 deletions
diff --git a/lib/depends.c b/lib/depends.c index da02e79a5..970a8da87 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -150,7 +150,7 @@ static /*@exposed@*/ struct availablePackage * alAddPackage(struct availableList struct availablePackage * p; rpmRelocation * r; int i; - int_32 * fileDirIndex; + int_32 * dirIndexes; const char ** dirNames; int numDirs, dirNum; int * dirMapping; @@ -189,15 +189,15 @@ static /*@exposed@*/ struct availablePackage * alAddPackage(struct availableList p->provideFlags = NULL; } - if (!headerGetEntryMinMemory(h, RPMTAG_COMPFILELIST, NULL, (void **) + if (!headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL, (void **) &p->baseNames, &p->filesCount)) { p->filesCount = 0; p->baseNames = NULL; } else { - headerGetEntryMinMemory(h, RPMTAG_COMPDIRLIST, NULL, (void **) + headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, &numDirs); - headerGetEntryMinMemory(h, RPMTAG_COMPFILEDIRS, NULL, (void **) - &fileDirIndex, NULL); + headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL, (void **) + &dirIndexes, NULL); /* XXX FIXME: We ought to relocate the directory list here */ @@ -234,20 +234,17 @@ static /*@exposed@*/ struct availablePackage * alAddPackage(struct availableList while (first < p->filesCount) { last = first; while ((last + 1) < p->filesCount) { - if (fileDirIndex[first] != fileDirIndex[last + 1]) break; + if (dirIndexes[first] != dirIndexes[last + 1]) break; last++; } - dirMatch = al->dirs + dirMapping[fileDirIndex[first]]; + dirMatch = al->dirs + dirMapping[dirIndexes[first]]; dirMatch->files = xrealloc(dirMatch->files, sizeof(*dirMatch->files) * (dirMatch->numFiles + last - first + 1)); for (fileNum = first; fileNum <= last; fileNum++) { dirMatch->files[dirMatch->numFiles].baseName = p->baseNames[fileNum]; -#ifdef DYING - dirMatch->files[dirMatch->numFiles].package = p; -#endif dirMatch->files[dirMatch->numFiles].pkgNum = pkgNum; dirMatch->numFiles++; } @@ -779,11 +776,7 @@ alFileSatisfiesDepend(struct availableList * al, if (keyType) rpmMessage(RPMMESS_DEBUG, _("%s: %s satisfied by added file " "list.\n"), keyType, fileName); -#ifdef DYING - return dirMatch->files[i].package; -#else return al->list + dirMatch->files[i].pkgNum; -#endif } } @@ -1466,11 +1459,11 @@ int rpmdepCheck(rpmTransactionSet rpmdep, int fileAlloced = 0; int len; - if (headerGetEntry(h, RPMTAG_COMPFILELIST, NULL, + if (headerGetEntry(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount)) { - headerGetEntry(h, RPMTAG_COMPDIRLIST, NULL, + headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); - headerGetEntry(h, RPMTAG_COMPFILEDIRS, NULL, + headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); rc = 0; for (j = 0; j < fileCount; j++) { diff --git a/lib/depends.h b/lib/depends.h index 6cf007871..470064958 100644 --- a/lib/depends.h +++ b/lib/depends.h @@ -28,9 +28,6 @@ struct availableIndexEntry { } ; struct fileIndexEntry { -#ifdef DYING - /*@owned@*/ struct availablePackage * package; -#endif int pkgNum; /*@dependent@*/ const char * baseName; } ; diff --git a/lib/fprint.c b/lib/fprint.c index 6b5e514e2..a212007a2 100644 --- a/lib/fprint.c +++ b/lib/fprint.c @@ -171,11 +171,11 @@ void fpLookupHeader(fingerPrintCache cache, Header h, fingerPrint * fpList) const char ** baseNames, ** dirNames; int_32 * dirIndexes; - if (!headerGetEntryMinMemory(h, RPMTAG_COMPFILELIST, NULL, + if (!headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount)) return; - headerGetEntryMinMemory(h, RPMTAG_COMPDIRLIST, NULL, (void **) &dirNames, + headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); - headerGetEntry(h, RPMTAG_COMPFILEDIRS, NULL, (void **) &dirIndexes, NULL); + headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); fpLookupList(cache, dirNames, baseNames, dirIndexes, fileCount, fpList); diff --git a/lib/header.c b/lib/header.c index 7b0558004..da38b76a5 100644 --- a/lib/header.c +++ b/lib/header.c @@ -106,6 +106,54 @@ struct sprintfToken { } u; }; +#if HAVE_MCHECK_H +static int probe_headers = 0; +#define HEADERPROBE(_h, _msg) if (probe_headers) headerProbe((_h), (_msg)) + +static void headerProbeAddr(Header h, const char * msg, + void * p, const char * imsg) +{ + const char * mchkstr = NULL; + switch (mprobe(p)) { + case MCHECK_DISABLED: + case MCHECK_OK: + return; + /*@notreached@*/ break; + case MCHECK_HEAD: + mchkstr = "HEAD"; + break; + case MCHECK_TAIL: + mchkstr = "TAIL"; + break; + case MCHECK_FREE: + mchkstr = "FREE"; + break; + } + fprintf(stderr, "*** MCHECK_%s h %p", mchkstr, h); + if (imsg && p) + fprintf(stderr, " %s %p", imsg, p); + if (msg) + fprintf(stderr, " %s", msg); + fprintf(stderr, "\n"); +} + +static void headerProbe(Header h, const char *msg) +{ + char imsg[256]; + int i; + + headerProbeAddr(h, msg, h, "header"); + sprintf(imsg, "index (used %d)", h->indexUsed); + headerProbeAddr(h, msg, h->index, imsg); + for (i = 0; i < h->indexUsed; i++) { + sprintf(imsg, "index[%d:%d].data", i, h->indexUsed); + headerProbeAddr(h, msg, h->index[i].data, imsg); + } +} +#else /* HAVE_MCHECK_H */ +#define HEADERPROBE(_h, _msg) +#endif /* HAVE_MCHECK_H */ + static void copyEntry(struct indexEntry * entry, /*@out@*/ int_32 * type, /*@out@*/ void ** p, /*@out@*/ int_32 * c, int minimizeMemory) { @@ -956,6 +1004,7 @@ static int intGetEntry(Header h, int_32 tag, /*@out@*/ int_32 *type, struct indexEntry * entry; char * chptr; + HEADERPROBE(h, "intGetEntry"); /* First find the tag */ entry = findEntry(h, tag, RPM_NULL_TYPE); if (!entry) { @@ -1023,6 +1072,7 @@ void headerFree(Header h) Header headerLink(Header h) { + HEADERPROBE(h, "headerLink"); h->usageCount++; return h; } diff --git a/lib/install.c b/lib/install.c index 842e05bae..0abf54bbe 100644 --- a/lib/install.c +++ b/lib/install.c @@ -107,11 +107,11 @@ static int assembleFileList(Header h, /*@out@*/ struct fileMemory ** memPtr, *memPtr = mem; - if (!headerIsEntry(h, RPMTAG_COMPFILELIST)) return 0; + if (!headerIsEntry(h, RPMTAG_BASENAMES)) return 0; rpmBuildFileList(h, &mem->names, fileCountPtr); - if (headerIsEntry(h, RPMTAG_ORIGCOMPFILELIST)) { + if (headerIsEntry(h, RPMTAG_ORIGBASENAMES)) { buildOrigFileList(h, &mem->cpioNames, fileCountPtr); } else { rpmBuildFileList(h, &mem->cpioNames, fileCountPtr); @@ -465,7 +465,7 @@ static int installSources(Header h, const char * rootdir, FD_t fd, } rpmMessage(RPMMESS_DEBUG, _("spec file in: %s\n"), realSpecDir); - if (h != NULL && headerIsEntry(h, RPMTAG_COMPFILELIST)) { + if (h != NULL && headerIsEntry(h, RPMTAG_BASENAMES)) { /* we can't remap v1 packages */ assembleFileList(h, &fileMem, &fileCount, &files, 0, NULL); @@ -736,7 +736,7 @@ int installBinaryPackage(const char * rootdir, rpmdb db, FD_t fd, Header h, /*@-unrecog@*/ chroot(rootdir); /*@=unrecog@*/ } - if (!(flags & RPMTRANS_FLAG_JUSTDB) && headerIsEntry(h, RPMTAG_COMPFILELIST)) { + if (!(flags & RPMTRANS_FLAG_JUSTDB) && headerIsEntry(h, RPMTAG_BASENAMES)) { const char * defaultPrefix; /* old format relocateable packages need the entire default prefix stripped to form the cpio list, while all other packages @@ -866,7 +866,7 @@ int installBinaryPackage(const char * rootdir, rpmdb db, FD_t fd, Header h, if (fileMem) freeFileMemory(fileMem); fileMem = NULL; } else if (flags & RPMTRANS_FLAG_JUSTDB) { - if (headerGetEntry(h, RPMTAG_COMPFILELIST, NULL, NULL, &fileCount)) { + if (headerGetEntry(h, RPMTAG_BASENAMES, NULL, NULL, &fileCount)) { fileStates = xmalloc(sizeof(*fileStates) * fileCount); memset(fileStates, RPMFILE_STATE_NORMAL, fileCount); headerAddEntry(h, RPMTAG_FILESTATES, RPM_CHAR_TYPE, fileStates, diff --git a/lib/misc.c b/lib/misc.c index 5b4a869ff..3d329df44 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -525,11 +525,11 @@ void compressFilelist(Header h) } exit: - headerAddEntry(h, RPMTAG_COMPDIRLIST, RPM_STRING_ARRAY_TYPE, + headerAddEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE, dirNames, dirIndex + 1); - headerAddEntry(h, RPMTAG_COMPFILEDIRS, RPM_INT32_TYPE, + headerAddEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, dirIndexes, count); - headerAddEntry(h, RPMTAG_COMPFILELIST, RPM_STRING_ARRAY_TYPE, + headerAddEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE, baseNames, count); xfree(fileNames); @@ -586,8 +586,8 @@ void expandFilelist(Header h) const char ** fileNames = NULL; int count = 0; - doBuildFileList(h, &fileNames, &count, RPMTAG_COMPFILELIST, - RPMTAG_COMPDIRLIST, RPMTAG_COMPFILEDIRS); + doBuildFileList(h, &fileNames, &count, RPMTAG_BASENAMES, + RPMTAG_DIRNAMES, RPMTAG_DIRINDEXES); if (fileNames == NULL || count <= 0) return; @@ -597,20 +597,20 @@ void expandFilelist(Header h) xfree(fileNames); - headerRemoveEntry(h, RPMTAG_COMPFILELIST); - headerRemoveEntry(h, RPMTAG_COMPDIRLIST); - headerRemoveEntry(h, RPMTAG_COMPFILEDIRS); + headerRemoveEntry(h, RPMTAG_BASENAMES); + headerRemoveEntry(h, RPMTAG_DIRNAMES); + headerRemoveEntry(h, RPMTAG_DIRINDEXES); } void rpmBuildFileList(Header h, const char *** fileListPtr, int * fileCountPtr) { - doBuildFileList(h, fileListPtr, fileCountPtr,RPMTAG_COMPFILELIST, - RPMTAG_COMPDIRLIST, RPMTAG_COMPFILEDIRS); + doBuildFileList(h, fileListPtr, fileCountPtr, RPMTAG_BASENAMES, + RPMTAG_DIRNAMES, RPMTAG_DIRINDEXES); } void buildOrigFileList(Header h, const char *** fileListPtr, int * fileCountPtr) { - doBuildFileList(h, fileListPtr, fileCountPtr, RPMTAG_ORIGCOMPFILELIST, - RPMTAG_ORIGCOMPDIRLIST, RPMTAG_ORIGCOMPFILEDIRS); + doBuildFileList(h, fileListPtr, fileCountPtr, RPMTAG_ORIGBASENAMES, + RPMTAG_ORIGDIRNAMES, RPMTAG_ORIGDIRINDEXES); } diff --git a/lib/query.c b/lib/query.c index 317199699..155fb90ab 100644 --- a/lib/query.c +++ b/lib/query.c @@ -176,7 +176,7 @@ int showQueryPackage(QVA_t *qva, /*@unused@*/rpmdb db, Header h) queryHeader(fp, h, queryFormat); if (queryFlags & QUERY_FOR_LIST) { - if (!headerGetEntry(h, RPMTAG_COMPFILELIST, &type, + if (!headerGetEntry(h, RPMTAG_BASENAMES, &type, (void **) &baseNames, &count)) { fputs(_("(contains no files)"), fp); fputs("\n", fp); @@ -185,9 +185,9 @@ int showQueryPackage(QVA_t *qva, /*@unused@*/rpmdb db, Header h) (void **) &fileStatesList, &count)) { fileStatesList = NULL; } - headerGetEntry(h, RPMTAG_COMPDIRLIST, NULL, + headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); - headerGetEntry(h, RPMTAG_COMPFILEDIRS, NULL, + headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); headerGetEntry(h, RPMTAG_FILEFLAGS, &type, (void **) &fileFlagsList, &count); diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 5d31c3c07..68bb18d66 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -396,11 +396,11 @@ int rpmdbFindByFile(rpmdb db, const char * filespec, dbiIndexSet * matches) continue; } - headerGetEntryMinMemory(h, RPMTAG_COMPFILELIST, NULL, + headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, NULL); - headerGetEntryMinMemory(h, RPMTAG_COMPFILEDIRS, NULL, + headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); - headerGetEntryMinMemory(h, RPMTAG_COMPDIRLIST, NULL, + headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); do { @@ -571,7 +571,7 @@ int rpmdbRemove(rpmdb db, unsigned int offset, int tolerant) free(conflictList); } - if (headerGetEntry(h, RPMTAG_COMPFILELIST, &type, (void **) &baseNames, + if (headerGetEntry(h, RPMTAG_BASENAMES, &type, (void **) &baseNames, &count)) { for (i = 0; i < count; i++) { rpmMessage(RPMMESS_DEBUG, _("removing file index for %s\n"), @@ -644,7 +644,7 @@ int rpmdbAdd(rpmdb db, Header dbentry) count = 0; - headerGetEntry(dbentry, RPMTAG_COMPFILELIST, &type, (void **) + headerGetEntry(dbentry, RPMTAG_BASENAMES, &type, (void **) &baseNames, &count); if (_noDirTokens) { @@ -937,11 +937,11 @@ int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList, return 1; } - headerGetEntryMinMemory(h, RPMTAG_COMPDIRLIST, NULL, + headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); - headerGetEntryMinMemory(h, RPMTAG_COMPFILELIST, NULL, + headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL, (void **) &fullBaseNames, &fc); - headerGetEntryMinMemory(h, RPMTAG_COMPFILEDIRS, NULL, + headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL, (void **) &fullDirIndexes, NULL); baseNames = xcalloc(num, sizeof(*baseNames)); diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 7d9605a64..790325e37 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -149,12 +149,12 @@ extern const struct headerSprintfExtension rpmHeaderFormats[]; #define RPMTAG_PROVIDEVERSION 1113 #define RPMTAG_OBSOLETEFLAGS 1114 #define RPMTAG_OBSOLETEVERSION 1115 -#define RPMTAG_COMPFILEDIRS 1116 -#define RPMTAG_COMPFILELIST 1117 -#define RPMTAG_COMPDIRLIST 1118 -#define RPMTAG_ORIGCOMPFILEDIRS 1119 /* internal */ -#define RPMTAG_ORIGCOMPFILELIST 1120 /* internal */ -#define RPMTAG_ORIGCOMPDIRLIST 1121 /* internal */ +#define RPMTAG_DIRINDEXES 1116 +#define RPMTAG_BASENAMES 1117 +#define RPMTAG_DIRNAMES 1118 +#define RPMTAG_ORIGDIRINDEXES 1119 /* internal */ +#define RPMTAG_ORIGBASENAMES 1120 /* internal */ +#define RPMTAG_ORIGDIRNAMES 1121 /* internal */ #define RPMTAG_FIRSTFREE_TAG 1122 /* internal */ #define RPMTAG_EXTERNAL_TAG 1000000 diff --git a/lib/transaction.c b/lib/transaction.c index 51b579b65..e56cc1905 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -366,10 +366,10 @@ static Header relocateFileList(struct availablePackage * alp, * backwards so that /usr/local relocations take precedence over /usr * ones. */ - headerGetEntry(h, RPMTAG_COMPFILELIST, NULL, (void **) &baseNames, + headerGetEntry(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount); - headerGetEntry(h, RPMTAG_COMPFILEDIRS, NULL, (void **) &dirIndexes, NULL); - headerGetEntry(h, RPMTAG_COMPDIRLIST, NULL, (void **) &dirNames, + headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); + headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, &dirCount); skipDirList = xcalloc(sizeof(*skipDirList), dirCount); @@ -508,24 +508,24 @@ static Header relocateFileList(struct availablePackage * alp, int t; p = NULL; - headerGetEntry(h, RPMTAG_COMPFILELIST, &t, &p, &c); - headerAddEntry(h, RPMTAG_ORIGCOMPFILELIST, t, p, c); + headerGetEntry(h, RPMTAG_BASENAMES, &t, &p, &c); + headerAddEntry(h, RPMTAG_ORIGBASENAMES, t, p, c); xfree(p); p = NULL; - headerGetEntry(h, RPMTAG_COMPDIRLIST, &t, &p, &c); - headerAddEntry(h, RPMTAG_ORIGCOMPDIRLIST, t, p, c); + headerGetEntry(h, RPMTAG_DIRNAMES, &t, &p, &c); + headerAddEntry(h, RPMTAG_ORIGDIRNAMES, t, p, c); xfree(p); p = NULL; - headerGetEntry(h, RPMTAG_COMPFILEDIRS, &t, &p, &c); - headerAddEntry(h, RPMTAG_ORIGCOMPFILEDIRS, t, p, c); + headerGetEntry(h, RPMTAG_DIRINDEXES, &t, &p, &c); + headerAddEntry(h, RPMTAG_ORIGDIRINDEXES, t, p, c); - headerModifyEntry(h, RPMTAG_COMPFILELIST, RPM_STRING_ARRAY_TYPE, + headerModifyEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE, baseNames, fileCount); - headerModifyEntry(h, RPMTAG_COMPDIRLIST, RPM_STRING_ARRAY_TYPE, + headerModifyEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE, dirNames, dirCount); - headerModifyEntry(h, RPMTAG_COMPFILEDIRS, RPM_INT32_TYPE, + headerModifyEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, dirIndexes, fileCount); } @@ -1284,7 +1284,7 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify, dbiFreeIndexRecord(dbi); } - if (headerGetEntry(alp->h, RPMTAG_COMPFILELIST, NULL, NULL, + if (headerGetEntry(alp->h, RPMTAG_BASENAMES, NULL, NULL, &fileCount)) totalFileCount += fileCount; } @@ -1295,7 +1295,7 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify, Header h; if ((h = rpmdbGetRecord(ts->db, ts->removedPackages[i]))) { - if (headerGetEntry(h, RPMTAG_COMPFILELIST, NULL, NULL, + if (headerGetEntry(h, RPMTAG_BASENAMES, NULL, NULL, &fileCount)) totalFileCount += fileCount; headerFree(h); @@ -1319,7 +1319,7 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify, i = ts->order[oc].u.addedIndex; alp = ts->addedPackages.list + ts->order[oc].u.addedIndex; - if (!headerGetEntryMinMemory(alp->h, RPMTAG_COMPFILELIST, NULL, + if (!headerGetEntryMinMemory(alp->h, RPMTAG_BASENAMES, NULL, NULL, &fi->fc)) { fi->h = headerLink(alp->h); hdrs[i] = headerLink(fi->h); @@ -1344,16 +1344,16 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify, fi->type = TR_REMOVED; break; } - if (!headerGetEntry(fi->h, RPMTAG_COMPFILELIST, NULL, + if (!headerGetEntry(fi->h, RPMTAG_BASENAMES, NULL, (void **) &fi->bnl, &fi->fc)) { /* This catches removed packages w/ no file lists */ fi->fc = 0; continue; } - headerGetEntry(fi->h, RPMTAG_COMPFILEDIRS, NULL, (void **) &fi->dil, + headerGetEntry(fi->h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil, NULL); - headerGetEntry(fi->h, RPMTAG_COMPDIRLIST, NULL, (void **) &fi->dnl, + headerGetEntry(fi->h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl, NULL); /* actions is initialized earlier for added packages */ diff --git a/lib/uninstall.c b/lib/uninstall.c index 251dcb2e3..ce12eb93e 100644 --- a/lib/uninstall.c +++ b/lib/uninstall.c @@ -132,7 +132,7 @@ int removeBinaryPackage(const char * prefix, rpmdb db, unsigned int offset, flags & RPMTRANS_FLAG_TEST); if (!(flags & RPMTRANS_FLAG_JUSTDB) && - headerGetEntry(h, RPMTAG_COMPFILELIST, NULL, (void **) &baseNames, + headerGetEntry(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount)) { const char ** fileMd5List; uint_32 * fileFlagsList; @@ -142,9 +142,9 @@ int removeBinaryPackage(const char * prefix, rpmdb db, unsigned int offset, char * fnbuffer = NULL; int prefixlen = 0; - headerGetEntry(h, RPMTAG_COMPFILEDIRS, NULL, (void **) &dirIndexes, + headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL); - headerGetEntry(h, RPMTAG_COMPDIRLIST, NULL, (void **) &dirNames, + headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL); /* Get alloca buffer for largest possible prefix + filename. */ diff --git a/lib/verify.c b/lib/verify.c index 1314601fc..feb84dce8 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -90,11 +90,11 @@ int rpmVerifyFile(const char * prefix, Header h, int filenum, int * result, flags = RPMVERIFY_ALL; } - headerGetEntry(h, RPMTAG_COMPFILELIST, &type, (void **) &baseNames, + headerGetEntry(h, RPMTAG_BASENAMES, &type, (void **) &baseNames, &count); - headerGetEntry(h, RPMTAG_COMPFILEDIRS, &type, (void **) &dirIndexes, + headerGetEntry(h, RPMTAG_DIRINDEXES, &type, (void **) &dirIndexes, NULL); - headerGetEntry(h, RPMTAG_COMPDIRLIST, &type, (void **) &dirNames, NULL); + headerGetEntry(h, RPMTAG_DIRNAMES, &type, (void **) &dirNames, NULL); filespec = alloca(strlen(dirNames[dirIndexes[filenum]]) + strlen(baseNames[filenum]) + strlen(prefix) + 5); @@ -258,7 +258,7 @@ static int verifyHeader(QVA_t *qva, Header h) if (!(qva->qva_flags & VERIFY_MD5)) omitMask = RPMVERIFY_MD5; if (headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlagsList, NULL) && - headerIsEntry(h, RPMTAG_COMPFILELIST)) { + headerIsEntry(h, RPMTAG_BASENAMES)) { rpmBuildFileList(h, &fileNames, &count); for (i = 0; i < count; i++) { |