From 13ce336f744d8b2849ace98b8c81040052a00f71 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 1 Aug 2006 14:26:54 +0000 Subject: Let urpmi.removemedia return an exit status of 1 when removing a media failed (#23923) --- urpmi.removemedia | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'urpmi.removemedia') diff --git a/urpmi.removemedia b/urpmi.removemedia index b29e53ef..bba2131c 100755 --- a/urpmi.removemedia +++ b/urpmi.removemedia @@ -83,6 +83,12 @@ if ($options{all}) { @toremove == 0 and die N("the entry to remove is missing\n(one of %s)\n", join(", ", @entries)); $urpm->select_media({ strict_match => $options{strict_match} }, @toremove); +my $selected = 0; +foreach (@{$urpm->{media}}) { + if ($_->{modified}) { $selected = 1; last } +} $urpm->remove_selected_media; $urpm->update_media(noclean => $options{noclean}); + +exit( $selected ? 0 : 1 ); -- cgit v1.2.1