aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-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