diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-02-19 16:38:59 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-02-19 16:38:59 +0000 |
commit | 80abd3ae98ed26e2b53c012f281214d2af126ddb (patch) | |
tree | 1bf1336b9881f086c91738fa106f9304bdd0bf04 | |
parent | 4f62e73fe8b3ff3121ccac10c0e858ddcc6c4a10 (diff) | |
download | perl-URPM-80abd3ae98ed26e2b53c012f281214d2af126ddb.tar perl-URPM-80abd3ae98ed26e2b53c012f281214d2af126ddb.tar.gz perl-URPM-80abd3ae98ed26e2b53c012f281214d2af126ddb.tar.bz2 perl-URPM-80abd3ae98ed26e2b53c012f281214d2af126ddb.tar.xz perl-URPM-80abd3ae98ed26e2b53c012f281214d2af126ddb.zip |
fix incorrect arch returned for packages without any (ie. public keys)
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,6 @@ Version 3.37.2 - 2011, by Per Øyvind Karlsen +- fix incorrect arch returned for packages without any (ie. public keys) - eliminate disttag & distepoch when extracting name, version, release to handle upgrade @@ -694,7 +694,7 @@ return_list_tag(URPM__Package pkg, int32_t tag_name) { case RPMTAG_ARCH: { get_fullname_parts(pkg, &name, &version, &release, &arch, &eos); - XPUSHs(sv_2mortal(newSVpv(arch, eos-arch))); + XPUSHs(sv_2mortal(newSVpv(arch == eos ? "" : arch, eos-arch))); } break; case RPMTAG_SUMMARY: @@ -1580,7 +1580,7 @@ Pkg_arch(pkg) char *eos; get_fullname_parts(pkg, NULL, NULL, NULL, &arch, &eos); - XPUSHs(sv_2mortal(newSVpv(arch, eos-arch))); + XPUSHs(sv_2mortal(newSVpv(arch == eos ? "" : arch, eos-arch))); restore_chars(); } else if (pkg->h) { XPUSHs(sv_2mortal(newSVpv(headerIsEntry(pkg->h, RPMTAG_SOURCERPM) ? get_name(pkg->h, RPMTAG_ARCH) : "src", 0))); @@ -1798,7 +1798,7 @@ Pkg_fullname(pkg) PUSHs(sv_2mortal(newSVpv(name, version-name-1))); PUSHs(sv_2mortal(newSVpv(version, release-version-1))); PUSHs(sv_2mortal(newSVpv(release, arch-release-1))); - PUSHs(sv_2mortal(newSVpv(arch, eos-arch))); + PUSHs(sv_2mortal(newSVpv(arch == eos ? "" : arch, eos-arch))); restore_chars(); } } else if (pkg->h) { |