From: Panu Matilainen Date: Thu, 12 Feb 2009 12:11:22 +0000 (+0200) Subject: Only initialize file capability cache if actually needed X-Git-Tag: tznext/4.11.0.1.tizen20130304~3159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51157419623f025149d154c8eb6a0874f1bc23f7;p=tools%2Flibrpm-tizen.git Only initialize file capability cache if actually needed - very few packages are going to have RPMTAG_FILECAPS at all --- diff --git a/lib/rpmfi.c b/lib/rpmfi.c index 2720172..53ff8f7 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -1217,7 +1217,7 @@ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, rpmfiFlags flags) if (!(flags & RPMFI_NOFILESTATES)) _hgfi(h, RPMTAG_FILESTATES, &td, defFlags, fi->fstates); - if (!(flags & RPMFI_NOFILECAPS)) { + if (!(flags & RPMFI_NOFILECAPS) && headerIsEntry(h, RPMTAG_FILECAPS)) { fi->fcapcache = strcacheNew(); fi->fcaps = cacheTag(fi->fcapcache, h, RPMTAG_FILECAPS); }