diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-08-29 15:10:26 +0000 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-11-23 20:57:44 +0100 |
commit | 22c8a374186b68db43c6a761d12e29a8a978cf22 (patch) | |
tree | 9d75a1e95abb36a558c7ed712b3a756563314864 /urpm | |
parent | 6c21647504e586307882d27a58881aa33dae5bf9 (diff) | |
download | urpmi-22c8a374186b68db43c6a761d12e29a8a978cf22.tar urpmi-22c8a374186b68db43c6a761d12e29a8a978cf22.tar.gz urpmi-22c8a374186b68db43c6a761d12e29a8a978cf22.tar.bz2 urpmi-22c8a374186b68db43c6a761d12e29a8a978cf22.tar.xz urpmi-22c8a374186b68db43c6a761d12e29a8a978cf22.zip |
Add --ignorearch to urpmi.addmedia --distrib
urpmi.addmedia --distrib --ignorearch allows to use --distrib to
create a chroot for a different architecture.
This is useful to build for armv5 or armv7 on the other one, and
to create chroots with qemu used to execute foreign binaries.
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/args.pm | 1 | ||||
-rw-r--r-- | urpm/media.pm | 6 |
2 files changed, 6 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; |