Load LONGFILESIZES into rpmfi if present

This commit is contained in:
Florian Festi 2013-04-19 14:13:46 +09:00
parent b9ce1c4d7a
commit f5d3a4b8a4
2 changed files with 6 additions and 2 deletions

View File

@ -246,6 +246,8 @@ rpm_loff_t rpmfiFSizeIndex(rpmfi fi, int ix)
if (fi != NULL && ix >= 0 && ix < fi->fc) { if (fi != NULL && ix >= 0 && ix < fi->fc) {
if (fi->fsizes != NULL) if (fi->fsizes != NULL)
fsize = fi->fsizes[ix]; fsize = fi->fsizes[ix];
else if (fi->lfsizes != NULL)
fsize = fi->lfsizes[ix];
} }
return fsize; return fsize;
} }
@ -1154,9 +1156,10 @@ static int rpmfiPopulate(rpmfi fi, Header h, rpmfiFlags flags)
_hgfi(h, RPMTAG_FILEFLAGS, &td, scareFlags, fi->fflags); _hgfi(h, RPMTAG_FILEFLAGS, &td, scareFlags, fi->fflags);
if (!(flags & RPMFI_NOFILEVERIFYFLAGS)) if (!(flags & RPMFI_NOFILEVERIFYFLAGS))
_hgfi(h, RPMTAG_FILEVERIFYFLAGS, &td, scareFlags, fi->vflags); _hgfi(h, RPMTAG_FILEVERIFYFLAGS, &td, scareFlags, fi->vflags);
if (!(flags & RPMFI_NOFILESIZES)) if (!(flags & RPMFI_NOFILESIZES)) {
_hgfi(h, RPMTAG_FILESIZES, &td, scareFlags, fi->fsizes); _hgfi(h, RPMTAG_FILESIZES, &td, scareFlags, fi->fsizes);
_hgfi(h, RPMTAG_LONGFILESIZES, &td, scareFlags, fi->lfsizes);
}
if (!(flags & RPMFI_NOFILECOLORS)) if (!(flags & RPMFI_NOFILECOLORS))
_hgfi(h, RPMTAG_FILECOLORS, &td, scareFlags, fi->fcolors); _hgfi(h, RPMTAG_FILECOLORS, &td, scareFlags, fi->fcolors);

View File

@ -26,6 +26,7 @@ struct rpmfi_s {
uint32_t * dil; /*!< Directory indice(s) (from header) */ uint32_t * dil; /*!< Directory indice(s) (from header) */
rpm_flag_t * fflags; /*!< File flag(s) (from header) */ rpm_flag_t * fflags; /*!< File flag(s) (from header) */
rpm_off_t * fsizes; /*!< File size(s) (from header) */ rpm_off_t * fsizes; /*!< File size(s) (from header) */
rpm_loff_t * lfsizes; /*!< File size(s) (from header) */
rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */ rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */
rpm_mode_t * fmodes; /*!< File mode(s) (from header) */ rpm_mode_t * fmodes; /*!< File mode(s) (from header) */
rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */ rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */