aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-05-04 13:40:17 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-05-04 13:40:17 +0000
commit8437ba2df3d5517edf5fc1cdeb94b4b334d7e014 (patch)
treeb9b8f29b4e05837f5514e462fca2749e6a1d256b
parent22d511b944b35aacd6cfcaca505e8c70ffda2eaf (diff)
downloadperl-URPM-8437ba2df3d5517edf5fc1cdeb94b4b334d7e014.tar
perl-URPM-8437ba2df3d5517edf5fc1cdeb94b4b334d7e014.tar.gz
perl-URPM-8437ba2df3d5517edf5fc1cdeb94b4b334d7e014.tar.bz2
perl-URPM-8437ba2df3d5517edf5fc1cdeb94b4b334d7e014.tar.xz
perl-URPM-8437ba2df3d5517edf5fc1cdeb94b4b334d7e014.zip
fix no arch for gpg-pubkey
-rw-r--r--URPM.xs13
1 files changed, 9 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index 51a5ea3..9f4d3cd 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2045,10 +2045,15 @@ Pkg_arch(pkg)
XPUSHs(sv_2mortal(newSVpv(arch ? arch : "", 0)));
restore_chars();
} else if (pkg->h) {
- if (headerIsEntry(pkg->h, RPMTAG_SOURCERPM)) {
- push_name(pkg, RPMTAG_ARCH);
- } else
- XPUSHs(sv_2mortal(newSVpvs("src")));
+ if (headerIsEntry(pkg->h, RPMTAG_ARCH)) {
+ if (headerIsEntry(pkg->h, RPMTAG_SOURCERPM)) {
+ push_name(pkg, RPMTAG_ARCH);
+ } else
+ XPUSHs(sv_2mortal(newSVpvs("src")));
+ }
+ else
+ /* gpg-pubkey packages has no arch tag */
+ XPUSHs(sv_2mortal(newSVpvs("")));
}
int