From 94c30b32db811cac8d564a19175a3f19455b60f1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 19 May 2008 15:15:57 +0000 Subject: - urpmi: o --auto-update should behave like urpmi.update when mirrorlist is outdated (cf http://forum.mandriva.com/viewtopic.php?t=86837) --- NEWS | 3 +++ urpmi | 31 +++++++++++++------------------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index c227bab5..5f411b0c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- urpmi: + o --auto-update should behave like urpmi.update when mirrorlist is outdated + (cf http://forum.mandriva.com/viewtopic.php?t=86837) - urpmi.addmedia: o add missing mark in "Do you want to add media '%s'?" message (from Nikos) - urpmi.addmedia, urpmi.update: diff --git a/urpmi b/urpmi index a120a798..a8f478d5 100755 --- a/urpmi +++ b/urpmi @@ -353,29 +353,13 @@ my $urpmi_lock = !$env && !$options{nolock} && urpm::lock::urpmi_db($urpm, '', w #- should we ignore arch compatibility if ($urpm->{options}{ignorearch}) { urpm::shunt_ignorearch() } -my %config_hash = ( - excludemedia => $excludemedia, - media => $media, - parallel => $parallel, - searchmedia => $searchmedia, - cmdline_skiplist => $options{skip}, - sortmedia => $sortmedia, - synthesis => $options{synthesis}, - update => $update, - usedistrib => $options{usedistrib}, - probe_with => $options{probe_with}, -); - 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")); - #- FIXME we need to configure it twice; otherwise - #- some settings are lost (like the skiplist) for - #- some reason. - urpm::media::configure($urpm, %config_hash); + urpm::media::read_config($urpm); urpm::media::update_media($urpm, all => 1, callback => \&urpm::download::sync_logger, @@ -389,7 +373,18 @@ if ($auto_update && !$bug && !$env) { $urpm->{obsoletes} = {}; } -urpm::media::configure($urpm, %config_hash); +urpm::media::configure($urpm, + excludemedia => $excludemedia, + media => $media, + parallel => $parallel, + searchmedia => $searchmedia, + cmdline_skiplist => $options{skip}, + sortmedia => $sortmedia, + synthesis => $options{synthesis}, + update => $update, + usedistrib => $options{usedistrib}, + probe_with => $options{probe_with}, +); if ($bug) { require urpm::bug_report; -- cgit v1.2.1