aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2010-12-11 20:51:21 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2010-12-11 20:51:21 +0000
commitc4c3364ad8d441a620bbe81962e9a51b8da94f5e (patch)
tree7cbdd8e5d23d43508718b88cbc6dedd7513fa0a8
parent002758b4f2893c2cb1fa75b9e61ea967ab3eddc6 (diff)
downloadperl-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.xs34
1 files changed, 20 insertions, 14 deletions
diff --git a/URPM.xs b/URPM.xs
index 5e053b8..47f3fe5 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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