diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-12-11 20:51:21 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-12-11 20:51:21 +0000 |
commit | c4c3364ad8d441a620bbe81962e9a51b8da94f5e (patch) | |
tree | 7cbdd8e5d23d43508718b88cbc6dedd7513fa0a8 | |
parent | 002758b4f2893c2cb1fa75b9e61ea967ab3eddc6 (diff) | |
download | perl-URPM-c4c3364ad8d441a620bbe81962e9a51b8da94f5e.tar perl-URPM-c4c3364ad8d441a620bbe81962e9a51b8da94f5e.tar.gz perl-URPM-c4c3364ad8d441a620bbe81962e9a51b8da94f5e.tar.bz2 perl-URPM-c4c3364ad8d441a620bbe81962e9a51b8da94f5e.tar.xz perl-URPM-c4c3364ad8d441a620bbe81962e9a51b8da94f5e.zip |
make URPM::Package->disttag & URPM::Package->distepoch work with synthesis also
-rw-r--r-- | URPM.xs | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -1599,6 +1599,26 @@ Pkg_release(pkg) XPUSHs(sv_2mortal(newSVpv(release, 0))); restore_chars(); +void Pkg_disttag(pkg) + URPM::Package pkg + INIT: + char *disttag; + PPCODE: + if(get_fullname_parts(pkg, NULL, NULL, NULL, NULL, &disttag, NULL, NULL, NULL)) + croak("invalid fullname"); + XPUSHs(sv_2mortal(newSVpv(disttag, 0))); + restore_chars(); + +void Pkg_distepoch(pkg) + URPM::Package pkg + INIT: + char *distepoch; + PPCODE: + if(get_fullname_parts(pkg, NULL, NULL, NULL, NULL, NULL, &distepoch, NULL, NULL)) + croak("invalid fullname"); + XPUSHs(sv_2mortal(newSVpv(distepoch, 0))); + restore_chars(); + void Pkg_arch(pkg) URPM::Package pkg @@ -2215,20 +2235,6 @@ Pkg_dirnames(pkg) xpush_simple_list_str(pkg->h, RPMTAG_DIRNAMES); SPAGAIN; -void Pkg_distepoch(pkg) - URPM::Package pkg - PPCODE: - if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTEPOCH), 0))); - } - -void Pkg_disttag(pkg) - URPM::Package pkg - PPCODE: - if (pkg->h) { - XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTTAG), 0))); - } - void Pkg_filelinktos(pkg) URPM::Package pkg |