From: Panu Matilainen Date: Wed, 7 Nov 2007 11:12:20 +0000 (+0200) Subject: Only do legacy retrofitting on packages that need it. X-Git-Tag: tznext/4.11.0.1.tizen20130304~5024 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b497a4f05fe04e86a120851830f578211fd5ddc1;p=tools%2Flibrpm-tizen.git Only do legacy retrofitting on packages that need it. Packages not having RPMTAG_DIRNAMES (ie compressed filenames) is used for checking, packages not having it are either built with rpm <= 3.x or with --nodirtokens, retrofitting in the latter case doesn't really hurt that much for the obscure case... --- diff --git a/lib/package.c b/lib/package.c index 7764683..6fbc9e1 100644 --- a/lib/package.c +++ b/lib/package.c @@ -966,8 +966,13 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) exit: if (rc != RPMRC_FAIL && h != NULL && hdrp != NULL) { - /* Convert legacy headers on the fly ... */ - legacyRetrofit(h, l); + /* + * Convert legacy headers on the fly. Not having "new" style compressed + * filenames is close enough estimate for legacy indication... + */ + if (!headerIsEntry(h, RPMTAG_DIRNAMES)) { + legacyRetrofit(h, l); + } /* Append (and remap) signature tags to the metadata. */ headerMergeLegacySigs(h, sigh);