summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-13 13:21:46 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-13 13:21:46 +0000
commit6c2023f0fd255166aae8e30fdfe81094cd70dc5b (patch)
treefc496dc4cdd8291325cee2cb7b2422cf5be942a6 /urpm.pm
parent5cda058a27dab4b7bda4f0b2fce18d07517e82b2 (diff)
downloadurpmi-6c2023f0fd255166aae8e30fdfe81094cd70dc5b.tar
urpmi-6c2023f0fd255166aae8e30fdfe81094cd70dc5b.tar.gz
urpmi-6c2023f0fd255166aae8e30fdfe81094cd70dc5b.tar.bz2
urpmi-6c2023f0fd255166aae8e30fdfe81094cd70dc5b.tar.xz
urpmi-6c2023f0fd255166aae8e30fdfe81094cd70dc5b.zip
Make --ignorearch really work by overriding a package subroutine (not very
clean, but fast)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm12
1 files changed, 7 insertions, 5 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;