diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.pm | 5 | ||||
-rw-r--r-- | URPM.xs | 14 |
3 files changed, 9 insertions, 13 deletions
@@ -1,4 +1,7 @@ Version 4.3 - +- URPM::Package::fullname will now always return six items for array in stead + of four to make room for disttag & distepoch, arch will still be returned as + last item (ie. array[5] in stead of array[3]) - URPM::Package::files_md5sum() has been renamed to URPM::Package::files_digest() - fix NEVRA parsing of 'gpg-pubkey' @@ -572,8 +572,9 @@ List of files in this rpm. =item $package->fullname() -Returns a 4 element list: name, version, release and architecture in an array -context. Returns a string NAME-VERSION-RELEASE.ARCH in scalar context. +Returns a 6 element list: name, version, release, disttag, distepoch and architecture +in an array context. Returns a string NAME-VERSION-RELEASE[-DISTTAGDISTEPOCH].ARCH +in scalar context. =item $package->get_tag($tagid) @@ -1781,25 +1781,17 @@ Pkg_fullname(pkg) PPCODE: if (gimme == G_ARRAY) { char *name, *version, *release, *disttag, *distepoch, *arch, *eos; - int items = 4; + int items = 6; if(get_fullname_parts(pkg, &name, NULL, &version, &release, &disttag, &distepoch, &arch, &eos)) croak("invalid fullname"); - /* XXX: This might result in the number of items and the order which returned - * being unexpected in the case of disttag/disttag being present. - */ - if(disttag != NULL) items++; - if(distepoch != NULL) items++; - EXTEND(SP, items); PUSHs(sv_2mortal(newSVpv(name, 0))); PUSHs(sv_2mortal(newSVpv(version, 0))); PUSHs(sv_2mortal(newSVpv(release, 0))); - if(disttag != NULL) - PUSHs(sv_2mortal(newSVpv(disttag, 0))); - if(distepoch != NULL) - PUSHs(sv_2mortal(newSVpv(distepoch, 0))); + PUSHs(sv_2mortal(newSVpv(disttag, 0))); + PUSHs(sv_2mortal(newSVpv(distepoch, 0))); PUSHs(sv_2mortal(newSVpv(arch, 0))); restore_chars(); } else if (gimme == G_SCALAR) { |