summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm12
-rwxr-xr-xurpmi4
-rwxr-xr-xurpmq4
3 files changed, 13 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index 29e7aa01..d2ef7fa4 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -26,6 +26,11 @@ BEGIN {
}
}
+#- this violently overrides is_arch_compat() to always return true.
+sub shunt_ignorearch {
+ eval q( sub URPM::Package::is_arch_compat { 1 } );
+}
+
#- create a new urpm object.
sub new {
my ($class) = @_;
@@ -2166,10 +2171,7 @@ sub search_packages {
#- try to search through provides.
if (my @l = map {
$_
- && ($options{ignorearch}
- ? 1
- : $options{src} ? $_->arch eq 'src' : $_->is_arch_compat
- )
+ && ($options{src} ? $_->arch eq 'src' : $_->is_arch_compat)
&& ($options{use_provides} || $_->name eq $v)
&& defined($_->id)
&& (!defined $urpm->{searchmedia} || (
@@ -2208,7 +2210,7 @@ sub search_packages {
(0 .. $#{$urpm->{depslist}})
) {
my $pkg = $urpm->{depslist}[$id];
- ($options{ignorearch} ? 1 : $options{src} ? $pkg->arch eq 'src' : $pkg->is_arch_compat) or next;
+ ($options{src} ? $pkg->arch eq 'src' : $pkg->is_arch_compat) or next;
my $pack_name = $pkg->name;
my $pack_ra = $pack_name . '-' . $pkg->version;
my $pack_a = "$pack_ra-" . $pkg->release;
diff --git a/urpmi b/urpmi
index a2c4b71b..0fb9954b 100755
--- a/urpmi
+++ b/urpmi
@@ -306,6 +306,9 @@ unless ($env || $nolock) {
$urpm->shlock_urpmi_db;
}
+#- should we ignore arch compatibility
+if ($urpm->{options}{ignorearch}) { urpm::shunt_ignorearch() }
+
my %config_hash = (
bug => $bug,
excludemedia => $excludemedia,
@@ -386,7 +389,6 @@ if (@names) {
all => $all,
use_provides => $use_provides,
fuzzy => $urpm->{options}{fuzzy},
- ignorearch => $urpm->{options}{ignorearch},
) || $force or exit 1;
}
if (@src_names) {
diff --git a/urpmq b/urpmq
index 195ecc81..d58d38ab 100755
--- a/urpmq
+++ b/urpmq
@@ -131,6 +131,9 @@ if ($urpm::args::options{env}) {
$urpm->{statedir} = $urpm::args::options{env};
}
+#- should we ignore arch compatibility
+if ($urpm::args::options{ignorearch}) { urpm::shunt_ignorearch() }
+
$urpm::args::options{upgrade} && !$urpm::args::options{env} && !$urpm::args::options{nolock}
and $urpm->shlock_rpm_db;
$urpm::args::options{nolock} or $urpm->shlock_urpmi_db;
@@ -200,7 +203,6 @@ if ($urpm::args::options{list_aliases}) {
fuzzy => $urpm::args::options{fuzzy},
caseinsensitive => $urpm::args::options{caseinsensitive},
all => $urpm::args::options{all},
- ignorearch => $urpm::args::options{ignorearch},
) or $urpm::args::options{force}
or exit 1;
}