diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-11-21 20:08:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-11-21 20:08:50 +0000 |
commit | 2723588f9316f16cb01f3c77d837c37bb28d190e (patch) | |
tree | 4bdba10c8ad68504279d5c583a1f9e1d5a803b4d | |
parent | d2c7b0d29879e15e7cd0662358aa045ad5cef4cc (diff) | |
download | perl-URPM-2723588f9316f16cb01f3c77d837c37bb28d190e.tar perl-URPM-2723588f9316f16cb01f3c77d837c37bb28d190e.tar.gz perl-URPM-2723588f9316f16cb01f3c77d837c37bb28d190e.tar.bz2 perl-URPM-2723588f9316f16cb01f3c77d837c37bb28d190e.tar.xz perl-URPM-2723588f9316f16cb01f3c77d837c37bb28d190e.zip |
alias obsoletes/provides/requires
-rw-r--r-- | URPM.xs | 42 |
1 files changed, 13 insertions, 29 deletions
@@ -1819,15 +1819,6 @@ Pkg_set_id(pkg, id=-1) pkg->flag |= id >= 0 && id <= FLAG_ID_MAX ? id : FLAG_ID_INVALID; void -Pkg_requires(pkg) - URPM::Package pkg - PPCODE: - PUTBACK; - return_list_str(pkg->requires, pkg->h, RPMTAG_REQUIRENAME, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIREVERSION, - callback_list_str_xpush, NULL); - SPAGAIN; - -void Pkg_suggests(pkg) URPM::Package pkg PPCODE: @@ -1838,10 +1829,21 @@ Pkg_suggests(pkg) void Pkg_obsoletes(pkg) URPM::Package pkg + ALIAS: + conflicts = 1 + provides = 2 + requires = 3 PPCODE: PUTBACK; - return_list_str(pkg->obsoletes, pkg->h, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEFLAGS, RPMTAG_OBSOLETEVERSION, - callback_list_str_xpush, NULL); + rpmTag tag, flags, tag_version; + char *s; + switch (ix) { + case 1: tag = RPMTAG_CONFLICTNAME; s = pkg->conflicts; flags = RPMTAG_CONFLICTFLAGS; tag_version = RPMTAG_CONFLICTVERSION; break; + case 2: tag = RPMTAG_PROVIDENAME; s = pkg->provides; flags = RPMTAG_PROVIDEFLAGS; tag_version = RPMTAG_PROVIDEVERSION; break; + case 3: tag = RPMTAG_REQUIRENAME; s = pkg->requires; flags = RPMTAG_REQUIREFLAGS; tag_version = RPMTAG_REQUIREVERSION; break; + default: tag = RPMTAG_OBSOLETENAME; s = pkg->obsoletes; flags = RPMTAG_OBSOLETEFLAGS; tag_version = RPMTAG_OBSOLETEVERSION; break; + } + return_list_str(s, pkg->h, tag, flags, tag_version, callback_list_str_xpush, NULL); SPAGAIN; void @@ -1920,24 +1922,6 @@ Pkg_obsoletes_overlap(pkg, s) RETVAL void -Pkg_conflicts(pkg) - URPM::Package pkg - PPCODE: - PUTBACK; - return_list_str(pkg->conflicts, pkg->h, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTVERSION, - callback_list_str_xpush, NULL); - SPAGAIN; - -void -Pkg_provides(pkg) - URPM::Package pkg - PPCODE: - PUTBACK; - return_list_str(pkg->provides, pkg->h, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDEVERSION, - callback_list_str_xpush, NULL); - SPAGAIN; - -void Pkg_buildarchs(pkg) URPM::Package pkg ALIAS: |