summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 17:18:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 17:18:08 +0000
commit4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3 (patch)
tree3c27e4f04eb1d0c8f8e890aa91f151e6ba763d79
parent681dbb8876abc0e9846c289f405f29d11fe297af (diff)
downloadurpmi-4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3.tar
urpmi-4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3.tar.gz
urpmi-4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3.tar.bz2
urpmi-4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3.tar.xz
urpmi-4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3.zip
- urpmi.addmedia
o exit on failing media instead of ignoring them (esp. for --distrib) (backported from 6.14.x branch)
-rw-r--r--NEWS3
-rw-r--r--urpm/media.pm1
-rwxr-xr-xurpmi.addmedia2
3 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index f7755247..0c050501 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- urpmi.addmedia
+ o exit on failing media instead of ignoring them (esp. for --distrib)
+
Version 5.19.9 - 15 October 2008
- gurpmi
diff --git a/urpm/media.pm b/urpm/media.pm
index 4d5873da..6094c0f5 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1605,6 +1605,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{failures_are_fatal};
$updates_result{$rc || 'error'}++;
}
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 1085b24f..4d6523ef 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -127,6 +127,8 @@ if (!-e $urpm->{config}) {
my $_urpmi_lock = urpm::lock::urpmi_db($urpm, 'exclusive', wait => $options{wait_lock});
urpm::media::read_config($urpm);
+$options{failures_are_fatal} = 1;
+
my $ok = 1;
if ($options{distrib}) {
$with || $relative_synthesis