diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-21 17:18:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-21 17:18:08 +0000 |
commit | 4edfcbfc3ba5ec47f1343b31241becdbeb3e24f3 (patch) | |
tree | 3c27e4f04eb1d0c8f8e890aa91f151e6ba763d79 | |
parent | 681dbb8876abc0e9846c289f405f29d11fe297af (diff) | |
download | urpmi-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-- | NEWS | 3 | ||||
-rw-r--r-- | urpm/media.pm | 1 | ||||
-rwxr-xr-x | urpmi.addmedia | 2 |
3 files changed, 6 insertions, 0 deletions
@@ -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 |