aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-12 13:56:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-12 13:56:40 +0000
commit0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6 (patch)
tree34e2c42a1bea5045f34bf8fd0d7c46ea38ea7d82 /URPM.xs
parent20ba103d07067b21f0089892eeae618af73d32ce (diff)
downloadperl-URPM-0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6.tar
perl-URPM-0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6.tar.gz
perl-URPM-0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6.tar.bz2
perl-URPM-0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6.tar.xz
perl-URPM-0ae6fc1c01e879250b0f0ba12c6dbefe84bea8c6.zip
- hack on $pkg->is_arch_compat to make it return true for noarch packages
when using rpm 4.4.8 (#31314)
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs5
1 files changed, 3 insertions, 2 deletions
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;
}