summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--urpm/media.pm2
-rwxr-xr-xurpmi.update4
3 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6713d6e1..add2fb2b 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,11 @@
o fix --force-key (#45094)
- urpmi.addmedia
o do not allow "/" in media name (#44765)
+- urpmi.update, urpmi.addmedia
+ o exit on failing media instead of ignoring them
+ (esp. for urpmi.addmedia --distrib).
+ exceptions: "urpmi.update -a" and "urpmi.update --update"
+ for backward compatibility
Version 6.17 - 14 October 2008
diff --git a/urpm/media.pm b/urpm/media.pm
index d0291b8e..71898729 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1664,6 +1664,7 @@ sub _update_media__handle_some_flags {
#- the recomputation of base files.
#- Recognized options :
#- all : all medias are being rebuilt
+#- allow_failures: whereas failing to update a medium is non fatal
#- callback : UI callback
#- forcekey : force retrieval of pubkey
#- force : try to force rebuilding base files
@@ -1689,6 +1690,7 @@ sub update_media {
my %updates_result;
foreach my $medium (grep { $_->{modified} } non_ignored_media($urpm)) {
my $rc = _update_medium($urpm, $medium, %options);
+ $rc or return if !$options{allow_failures};
$updates_result{$rc || 'error'}++;
}
diff --git a/urpmi.update b/urpmi.update
index 7698d324..229820b9 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -73,6 +73,10 @@ urpm::media::read_config($urpm, 'nocheck');
my @chosen_media;
+if ($options{all} || $options{update}) {
+ $options{allow_failures} = 1;
+}
+
if ($options{all} && !defined $options{ignore}) {
@chosen_media = @{$urpm->{media}}
or die N("nothing to update (use urpmi.addmedia to add a media)\n");