diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-04 13:40:17 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-05-04 13:40:17 +0000 |
commit | 8437ba2df3d5517edf5fc1cdeb94b4b334d7e014 (patch) | |
tree | b9b8f29b4e05837f5514e462fca2749e6a1d256b | |
parent | 22d511b944b35aacd6cfcaca505e8c70ffda2eaf (diff) | |
download | perl-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.xs | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 |