From e62694221045e66423fa584fb9676fb2179e5198 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Oct 2008 14:40:01 +0000 Subject: - 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 --- urpm/media.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'urpm') 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'}++; } -- cgit v1.2.1