summaryrefslogtreecommitdiff
path: root/lib/rpmfi.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-09-07 11:14:14 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-09-07 13:34:37 +0300
commit4606460e54a1a151f74557712355ffc5d32da7c4 (patch)
tree9ff8ec7bc6a2073ffb2acd1c28f1eec8f362ab6f /lib/rpmfi.c
parent9e47043b2d23d6e6657a2a18dd325d2ef014dba3 (diff)
downloadlibrpm-tizen-4606460e54a1a151f74557712355ffc5d32da7c4.tar.gz
librpm-tizen-4606460e54a1a151f74557712355ffc5d32da7c4.tar.bz2
librpm-tizen-4606460e54a1a151f74557712355ffc5d32da7c4.zip
Dont bother with file capability "cache"
- Very few packages have RPMTAG_FILECAPS at all, and the memory saving for those that do is so marginal it hardly matters at all. At least for now, dont bother.
Diffstat (limited to 'lib/rpmfi.c')
-rw-r--r--lib/rpmfi.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 553fc6572..9ef372548 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -432,7 +432,7 @@ const char * rpmfiFCapsIndex(rpmfi fi, int ix)
{
const char *fcaps = NULL;
if (fi != NULL && ix >= 0 && ix < fi->fc) {
- fcaps = fi->fcapcache ? strcacheGet(fi->fcapcache, fi->fcaps[ix]) : "";
+ fcaps = fi->fcaps ? fi->fcaps[ix] : "";
}
return fcaps;
}
@@ -1082,7 +1082,6 @@ rpmfi rpmfiFree(rpmfi fi)
fi->flinks = _free(fi->flinks);
fi->flangs = _free(fi->flangs);
fi->digests = _free(fi->digests);
- fi->fcapcache = strcacheFree(fi->fcapcache);
fi->fcaps = _free(fi->fcaps);
fi->cdict = _free(fi->cdict);
@@ -1210,10 +1209,8 @@ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags)
if (!(flags & RPMFI_NOFILESTATES))
_hgfi(h, RPMTAG_FILESTATES, &td, defFlags, fi->fstates);
- if (!(flags & RPMFI_NOFILECAPS) && headerIsEntry(h, RPMTAG_FILECAPS)) {
- fi->fcapcache = strcacheNew();
- fi->fcaps = cacheTag(fi->fcapcache, h, RPMTAG_FILECAPS);
- }
+ if (!(flags & RPMFI_NOFILECAPS))
+ _hgfi(h, RPMTAG_FILECAPS, &td, defFlags, fi->fcaps);
if (!(flags & RPMFI_NOFILELINKTOS)) {
fi->flinkcache = strcacheNew();