diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-11-07 13:12:20 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-11-07 13:12:20 +0200 |
commit | b497a4f05fe04e86a120851830f578211fd5ddc1 (patch) | |
tree | 6dce6fac8137b98921e40c4a2e4896ca4d2bb30a /lib | |
parent | 8f97ae9d265bcdc542055320b1a2bd346eb63475 (diff) | |
download | librpm-tizen-b497a4f05fe04e86a120851830f578211fd5ddc1.tar.gz librpm-tizen-b497a4f05fe04e86a120851830f578211fd5ddc1.tar.bz2 librpm-tizen-b497a4f05fe04e86a120851830f578211fd5ddc1.zip |
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...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/package.c b/lib/package.c index 7764683b4..6fbc9e1f4 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); |