diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-08-01 14:26:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> | 2006-08-01 14:26:54 +0000 |
commit | 13ce336f744d8b2849ace98b8c81040052a00f71 (patch) | |
tree | 9cef02034b883c013227c95b5bd635be86f49e43 | |
parent | aacf099aadc9dafe31371921966e814f7ac4f961 (diff) | |
download | urpmi-13ce336f744d8b2849ace98b8c81040052a00f71.tar urpmi-13ce336f744d8b2849ace98b8c81040052a00f71.tar.gz urpmi-13ce336f744d8b2849ace98b8c81040052a00f71.tar.bz2 urpmi-13ce336f744d8b2849ace98b8c81040052a00f71.tar.xz urpmi-13ce336f744d8b2849ace98b8c81040052a00f71.zip |
Let urpmi.removemedia return an exit status of 1 when removing a media failed (#23923)
-rwxr-xr-x | urpmi.removemedia | 6 |
1 files changed, 6 insertions, 0 deletions
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 ); |