diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-14 18:23:59 +0000 |
commit | d44583e8bd45872b9396815057d6f1b0e1218098 (patch) | |
tree | 48b8e0709531cf173dc094ab37e7ea13c016f56a /URPM.xs | |
parent | 3bed5a8577c9a5175fd2d10b5a5c217cddc90406 (diff) | |
download | perl-URPM-d44583e8bd45872b9396815057d6f1b0e1218098.tar perl-URPM-d44583e8bd45872b9396815057d6f1b0e1218098.tar.gz perl-URPM-d44583e8bd45872b9396815057d6f1b0e1218098.tar.bz2 perl-URPM-d44583e8bd45872b9396815057d6f1b0e1218098.tar.xz perl-URPM-d44583e8bd45872b9396815057d6f1b0e1218098.zip |
(update_provides_files) fix support for RPMTAG_OLDFILENAMES
it is broken since commit r250325 by pixel on Tue Dec 9 2008
(4 years!!!): "- adapt to rpm 4.6 changes: headerGetEntry -> headerGet"
previously 'list' was initialized the right way
note: still needed for the testsuite
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1000,7 +1000,6 @@ static void update_provides_files(const URPM__Package pkg, HV *provides) { if (pkg->h) { STRLEN len; - char **list = NULL; unsigned int i; struct rpmtd_s td_baseNames, td_dirIndexes, td_dirNames; @@ -1030,15 +1029,16 @@ update_provides_files(const URPM__Package pkg, HV *provides) { free(dirNames); } else { struct rpmtd_s td; - headerGet(pkg->h, RPMTAG_OLDFILENAMES, &td, HEADERGET_DEFAULT); - if (list) { + + if (headerGet(pkg->h, RPMTAG_OLDFILENAMES, &td, HEADERGET_DEFAULT)) { for (i = 0; i < rpmtdCount(&td); i++) { - len = strlen(list[i]); + const char *s = rpmtdNextString(&td); + len = strlen(s); - update_provide_entry(list[i], len, 0, 0, pkg, provides); + update_provide_entry(s, len, 0, 0, pkg, provides); } - free(list); + rpmtdFreeData(&td); } } } |