aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--URPM.xs5
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0c2d261..823de3a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- hack on $pkg->is_arch_compat to make it return true for noarch packages
+ when using rpm 4.4.8 (#31314)
+
Version 1.63 - 9 May 2007, by Pascal "Pixel" Rigaux
- add $trans->Element_fullname
diff --git a/URPM.xs b/URPM.xs
index 2455475..cdb5f59 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1342,10 +1342,11 @@ Pkg_is_arch_compat(pkg)
get_fullname_parts(pkg, NULL, NULL, NULL, &arch, &eos);
*eos = 0;
- RETVAL = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch);
+ RETVAL = strcmp(arch, "noarch") == 0 ? 4 : rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch);
*eos = '@';
} else if (pkg->h && headerIsEntry(pkg->h, RPMTAG_SOURCERPM)) {
- RETVAL = rpmMachineScore(RPM_MACHTABLE_INSTARCH, get_name(pkg->h, RPMTAG_ARCH));
+ char *arch = get_name(pkg->h, RPMTAG_ARCH);
+ RETVAL = strcmp(arch, "noarch") == 0 ? 4 : rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch);
} else {
RETVAL = 0;
}