{
const char *fcaps = NULL;
if (fi != NULL && ix >= 0 && ix < fi->fc) {
- fcaps = fi->fcaps ? fi->fcaps[ix] : "";
+ fcaps = fi->fcapcache ? strcacheGet(fi->fcapcache, fi->fcaps[ix]) : "";
}
return fcaps;
}
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);
if (!(flags & RPMFI_NOFILESTATES))
_hgfi(h, RPMTAG_FILESTATES, &td, defFlags, fi->fstates);
- if (!(flags & RPMFI_NOFILECAPS))
- _hgfi(h, RPMTAG_FILECAPS, &td, defFlags, fi->fcaps);
+ if (!(flags & RPMFI_NOFILECAPS)) {
+ fi->fcapcache = strcacheNew();
+ fi->fcaps = cacheTag(fi->fcapcache, h, RPMTAG_FILECAPS);
+ }
if (!(flags & RPMFI_NOFILELINKTOS)) {
fi->flinkcache = strcacheNew();
char * fstates; /*!< File state(s) (from header) */
const rpm_color_t * fcolors;/*!< File color bits (header) */
- const char ** fcaps; /*! File capabilities (header) */
+ strcache fcapcache; /*!< File capabilities cache */
+ scidx_t * fcaps; /*!< Index to file cap(s) cache */
const char ** cdict; /*!< File class dictionary (header) */
rpm_count_t ncdict; /*!< No. of class entries. */