diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-06-21 11:12:33 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-06-21 11:12:33 +0000 |
commit | d494971f6bfe48ccaa1dfb9811535048e05d2d36 (patch) | |
tree | e523a974959649c22a0ce757dfb40295d61cba4f | |
parent | 9b8cafaf4b5147791c21da13cdda9aeaaecbeb27 (diff) | |
download | perl-URPM-d494971f6bfe48ccaa1dfb9811535048e05d2d36.tar perl-URPM-d494971f6bfe48ccaa1dfb9811535048e05d2d36.tar.gz perl-URPM-d494971f6bfe48ccaa1dfb9811535048e05d2d36.tar.bz2 perl-URPM-d494971f6bfe48ccaa1dfb9811535048e05d2d36.tar.xz perl-URPM-d494971f6bfe48ccaa1dfb9811535048e05d2d36.zip |
support getting disttag & distepoch from synthesis
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.xs | 20 |
2 files changed, 20 insertions, 3 deletions
@@ -1,5 +1,6 @@ -Version 3.37.2 - 26 April 2011, by Per Øyvind Karlsen +Version 3.37.2 - 21 June 2011, by Per Øyvind Karlsen +- support getting disttag & distepoch from synthesis - fix URPM::Package->distepoch to actually work - add disttag & distepoch at end of @info@ line - add support for doing comparision against provides with distepoch to allow @@ -2516,14 +2516,30 @@ Pkg_dirnames(pkg) void Pkg_distepoch(pkg) URPM::Package pkg PPCODE: - if (pkg->h) { + if (pkg->info) { + int i; + char *tmp = pkg->info, *eos = NULL; + for (i = 0; i < 5 && tmp != NULL; i++) + tmp = strchr(++tmp, '@'); + if (tmp != NULL && *tmp) + eos = strchr(++tmp, '@'); + XPUSHs(sv_2mortal(newSVpv((tmp && *tmp != '@') ? tmp : "", eos ? eos-tmp : 0))); + } else 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) { + if (pkg->info) { + int i; + char *tmp = pkg->info, *eos = NULL; + for (i = 0; i < 4 && tmp != NULL; i++) + tmp = strchr(++tmp, '@'); + if (tmp != NULL && *tmp) + eos = strchr(++tmp, '@'); + XPUSHs(sv_2mortal(newSVpv((tmp && *tmp != '@') ? tmp : "", eos ? eos-tmp : 0))); + } else if (pkg->h) { XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_DISTTAG), 0))); } |