summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 14:40:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 14:40:01 +0000
commite62694221045e66423fa584fb9676fb2179e5198 (patch)
treeb9ddaa8aac753d5fc36112b82d1ee6bb29fdf8e9 /urpm
parent905851a1beac15d6936b9f93fb701660fb676617 (diff)
downloadurpmi-e62694221045e66423fa584fb9676fb2179e5198.tar
urpmi-e62694221045e66423fa584fb9676fb2179e5198.tar.gz
urpmi-e62694221045e66423fa584fb9676fb2179e5198.tar.bz2
urpmi-e62694221045e66423fa584fb9676fb2179e5198.tar.xz
urpmi-e62694221045e66423fa584fb9676fb2179e5198.zip
- 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
Diffstat (limited to 'urpm')
-rw-r--r--urpm/media.pm2
1 files changed, 2 insertions, 0 deletions
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'}++;
}