summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-20 08:22:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-20 08:22:39 +0000
commit5ba817cb4cedccc2d0b289abb81e3fd01d7651ef (patch)
tree2534bde5103f7f007da1913d38697b33ccb09155
parentb6b22789d8ad280edc50550c622dea0c2269aa50 (diff)
downloadurpmi-5ba817cb4cedccc2d0b289abb81e3fd01d7651ef.tar
urpmi-5ba817cb4cedccc2d0b289abb81e3fd01d7651ef.tar.gz
urpmi-5ba817cb4cedccc2d0b289abb81e3fd01d7651ef.tar.bz2
urpmi-5ba817cb4cedccc2d0b289abb81e3fd01d7651ef.tar.xz
urpmi-5ba817cb4cedccc2d0b289abb81e3fd01d7651ef.zip
- urpmi
o fix --auto-update ignoring --media and default-media (#45097) (backported from trunk)
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm2
-rwxr-xr-xurpmi15
3 files changed, 4 insertions, 15 deletions
diff --git a/NEWS b/NEWS
index 8badcbba..a671f4b1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- urpmi
+ o fix --auto-update ignoring --media and default-media (#45097)
- urpme, library
o do not display things like "conflicts@b-1-1.noarch@a-1-1.noarch@/etc/foo"
(regression introduced in 6.14.5)
diff --git a/urpm/media.pm b/urpm/media.pm
index 5372d170..8a9d79ed 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -641,7 +641,7 @@ sub _auto_update_media {
$options{callback} = delete $options{download_callback};
my $errors;
- foreach (grep { $_->{force_auto_update} || _is_remote_virtual($_) }
+ foreach (grep { $_->{force_auto_update} || _is_remote_virtual($_) || $urpm->{options}{'auto-update'} }
non_ignored_media($urpm, $options{update})) {
_update_medium($urpm, $_, %options) or $errors++;
}
diff --git a/urpmi b/urpmi
index d608ce70..4238159f 100755
--- a/urpmi
+++ b/urpmi
@@ -345,20 +345,7 @@ if ($urpm->{root}) {
$urpm->{options}{'priority-upgrade'} = '' if !$ENV{TESTING_priority_upgrade};
}
if ($auto_update && !$bug && !$env) {
- #- For translators : there are several media here
- $urpm->{log}(N("Updating media...\n"));
- urpm::media::read_config($urpm);
- urpm::media::update_media($urpm,
- all => 1,
- callback => \&urpm::download::sync_logger,
- quiet => $options{verbose} < 0,
- nomd5sum => $nomd5sum,
- forcekey => $forcekey,
- );
- delete $urpm->{media};
- $urpm->{depslist} = [];
- $urpm->{provides} = {};
- $urpm->{obsoletes} = {};
+ $urpm->{options}{'auto-update'} = 1;
}
urpm::media::configure($urpm,