diff options
-rw-r--r-- | urpm/args.pm | 1 | ||||
-rw-r--r-- | urpm/media.pm | 6 | ||||
-rwxr-xr-x | urpmi.addmedia | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm index 26c07f0b..2dee2e6a 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -367,6 +367,7 @@ my %options_spec = ( nopubkey => \$options{nopubkey}, raw => \$options{raw}, 'verify-rpm!' => sub { ${options}{'verify-rpm'} = $_[1] }, + 'ignorearch' => sub { $options{ignorearch} = 1 }, }, ); diff --git a/urpm/media.pm b/urpm/media.pm index 801c36be..387b1326 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -1089,6 +1089,10 @@ only_updates : only add "update" media (used by rpmdrake) =item * +ignorearch : add media even if the arch is not compatible with current one, for example to create a chroot + +=item * + mirrorlist =item * @@ -1180,7 +1184,7 @@ sub add_distrib_media { my $media_name = $distribconf->getvalue($media, 'name') || ''; if (my $media_arch = $distribconf->getvalue($media, 'arch')) { - if (!URPM::archscore($media_arch)) { + if (!$options{ignorearch} && !URPM::archscore($media_arch)) { $urpm->{log}(N("skipping non compatible media `%s' (for %s)", $media, $media_arch)); next; diff --git a/urpmi.addmedia b/urpmi.addmedia index 8b4d08f9..19d23b02 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -75,6 +75,7 @@ and [options] are from medium. ") . N(" --interactive - with --distrib, ask confirmation for each media ") . N(" --all-media - with --distrib, add every listed media +") . N(" --ignorearch - with --distrib, add media from incompatible archs ") . N(" --virtual - create virtual media wich are always up-to-date. ") . N(" --no-md5sum - disable MD5SUM file checking. ") . N(" --nopubkey - don't import pubkey of added media @@ -153,6 +154,7 @@ if ($options{distrib}) { ask_media => $add_media_callback, 'verify-rpm' => $options{'verify-rpm'}, 'xml-info' => $options{'xml-info'}, + ignorearch => $options{ignorearch}, ) or $urpm->{fatal}(10, N("unable to add medium")); $ok = urpm::media::update_media($urpm, %options, quiet => $options{verbose} < 0, |