summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-08-29 15:10:26 +0000
committerPascal Terjan <pterjan@mageia.org>2020-09-09 15:52:20 +0000
commitfb6b4799fe4de44d9877422f68f4efbf602d3494 (patch)
tree0460adeda1a8735df74011c0d03c5659cd564425 /urpm/media.pm
parent82babb54cd00fbf27fbe1405529a723ce812d50b (diff)
downloadurpmi-fb6b4799fe4de44d9877422f68f4efbf602d3494.tar
urpmi-fb6b4799fe4de44d9877422f68f4efbf602d3494.tar.gz
urpmi-fb6b4799fe4de44d9877422f68f4efbf602d3494.tar.bz2
urpmi-fb6b4799fe4de44d9877422f68f4efbf602d3494.tar.xz
urpmi-fb6b4799fe4de44d9877422f68f4efbf602d3494.zip
Add --ignorearch to urpmi.addmedia --distribuser/pterjan/ignorearch
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/media.pm')
-rw-r--r--urpm/media.pm6
1 files changed, 5 insertions, 1 deletions
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;