summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 14:30:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 14:30:17 +0000
commit8f978a960f4c0ff97970d753d0ce63a1728da0d7 (patch)
tree1693f39b16e64282a5248b54c81bd3b4e5f6ae88
parent2f70c4e00c04c4018ba3a21a458f8063b939f2d0 (diff)
downloadurpmi-8f978a960f4c0ff97970d753d0ce63a1728da0d7.tar
urpmi-8f978a960f4c0ff97970d753d0ce63a1728da0d7.tar.gz
urpmi-8f978a960f4c0ff97970d753d0ce63a1728da0d7.tar.bz2
urpmi-8f978a960f4c0ff97970d753d0ce63a1728da0d7.tar.xz
urpmi-8f978a960f4c0ff97970d753d0ce63a1728da0d7.zip
- urpmi.addmedia
o exit on failing media instead of ignoring them (esp. for --distrib)
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm1
-rwxr-xr-xurpmi.addmedia2
3 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 93c712f1..0485c8a5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
- urpmi
o fix --auto-update ignoring --media and default-media (#45097)
+- urpmi.addmedia
+ o exit on failing media instead of ignoring them (esp. for --distrib)
- urpmi.update
o fix --force-key (#45094)
- urpme, library
diff --git a/urpm/media.pm b/urpm/media.pm
index 6f8980d7..67f4cefa 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1689,6 +1689,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 0c6c9d48..fe06ac85 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -130,6 +130,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