summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-25 12:52:13 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-25 12:52:13 +0000
commit51aaf2e1d28125ce85207526ca24cf95414b6430 (patch)
tree700f7bdf9ab04949db25f3d4084de3f657cd796f
parent8223d12fa5e64757d7c3defa1875777894160f76 (diff)
downloadurpmi-51aaf2e1d28125ce85207526ca24cf95414b6430.tar
urpmi-51aaf2e1d28125ce85207526ca24cf95414b6430.tar.gz
urpmi-51aaf2e1d28125ce85207526ca24cf95414b6430.tar.bz2
urpmi-51aaf2e1d28125ce85207526ca24cf95414b6430.tar.xz
urpmi-51aaf2e1d28125ce85207526ca24cf95414b6430.zip
(add_distrib_media) disable non-free repository by default for Free
edition instead of not adding them (#40033)
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm15
2 files changed, 8 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 50b62d92..a94ce870 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
- urpmi.addmedia:
- o do not add non-free repository by default for Free edition (#40033)
+ o disable non-free repository by default for Free edition (#40033)
Version 6.34 - 25 January 2010
diff --git a/urpm/media.pm b/urpm/media.pm
index 9c79071f..c045d8b8 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -935,14 +935,6 @@ sub add_distrib_media {
foreach my $media ($distribconf->listmedia) {
my $media_name = $distribconf->getvalue($media, 'name') || '';
- my @media_types = split(':', $distribconf->getvalue($media, 'media_type'));
- if ($product_id->{product} eq 'Free') {
- if (member('non-free', @media_types)) {
- $urpm->{log}(N("skipping non-free medium `%s'", $media));
- next;
- }
- }
-
if (my $media_arch = $distribconf->getvalue($media, 'arch')) {
if (!URPM::archscore($media_arch)) {
$urpm->{log}(N("skipping non compatible media `%s' (for %s)",
@@ -957,6 +949,13 @@ sub add_distrib_media {
}
my $add_by_default = !$distribconf->getvalue($media, 'noauto');
+ my @media_types = split(':', $distribconf->getvalue($media, 'media_type'));
+ if ($product_id->{product} eq 'Free') {
+ if (member('non-free', @media_types)) {
+ $urpm->{log}(N("ignoring non-free medium `%s'", $media));
+ $add_by_default = 0;
+ }
+ }
my $ignore;
if ($options{ask_media}) {
$options{ask_media}->($media_name, $add_by_default) or next;