diff options
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -760,7 +760,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { } static char * -pack_list(const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, rpmsenseFlags (*check_flag)(rpmsenseFlags)) { +pack_list(const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version) { char buff[65536]; rpmTag *flags = NULL; char **list_evr = NULL; @@ -775,7 +775,6 @@ pack_list(const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_ver if (tag_flags && headerGet(header, tag_flags, &td_flags, HEADERGET_DEFAULT)) flags = td_flags.data; if (tag_version && headerGet(header, tag_version, &td_list_evr, HEADERGET_DEFAULT)) list_evr = td_list_evr.data; for(i = 0; i < rpmtdCount(&td); i++) { - if (check_flag && !check_flag(flags[i])) continue; int len = print_list_entry(p, sizeof(buff)-(p-buff)-1, list[i], flags ? flags[i] : 0, list_evr ? list_evr[i] : NULL); if (len < 0) continue; p += len; @@ -806,14 +805,14 @@ pack_header(const URPM__Package pkg) { } if (pkg->filesize == 0) pkg->filesize = get_filesize(pkg->h); if (pkg->requires == NULL && pkg->suggests == NULL) - pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION, NULL); - pkg->suggests = pack_list(pkg->h, RPMTAG_SUGGESTSNAME, 0, 0, NULL); + pkg->requires = pack_list(pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION); + pkg->suggests = pack_list(pkg->h, RPMTAG_SUGGESTSNAME, 0, 0); if (pkg->obsoletes == NULL) - pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION, NULL); + pkg->obsoletes = pack_list(pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION); if (pkg->conflicts == NULL) - pkg->conflicts = pack_list(pkg->h, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTVERSION, NULL); + pkg->conflicts = pack_list(pkg->h, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTVERSION); if (pkg->provides == NULL) - pkg->provides = pack_list(pkg->h, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDEVERSION, NULL); + pkg->provides = pack_list(pkg->h, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDEVERSION); if (pkg->summary == NULL) { char *summary = get_name(pkg->h, RPMTAG_SUMMARY); int len = 1 + strlen(summary); |