summaryrefslogtreecommitdiffstats
path: root/urpmi.update
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-05 16:16:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-05 16:16:52 +0000
commitc1314b9fdbea88d3d2e2f53fa3344f996e663d8c (patch)
tree035b51f2414906a32043b004566554aeaa4bcfb3 /urpmi.update
parenta9def5f61d5a49e5f148951af4e422c446b57c84 (diff)
downloadurpmi-c1314b9fdbea88d3d2e2f53fa3344f996e663d8c.tar
urpmi-c1314b9fdbea88d3d2e2f53fa3344f996e663d8c.tar.gz
urpmi-c1314b9fdbea88d3d2e2f53fa3344f996e663d8c.tar.bz2
urpmi-c1314b9fdbea88d3d2e2f53fa3344f996e663d8c.tar.xz
urpmi-c1314b9fdbea88d3d2e2f53fa3344f996e663d8c.zip
- urpmi.update:
o exit code 1 when a (selected) medium can't be updated (#35952) o leave early with error if no medium were successfull updated nb: also fix returning "unmodified" instead of "1" when a medium is not updated
Diffstat (limited to 'urpmi.update')
-rwxr-xr-xurpmi.update3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpmi.update b/urpmi.update
index 9d6357e2..9de870e2 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -101,9 +101,10 @@ if (defined $options{ignore}) {
$urpm->{log}($options{ignore} ? N("ignoring media %s", $str) : N("enabling media %s", $str));
urpm::media::write_config($urpm);
} else {
- urpm::media::update_media($urpm, %options,
+ my $ok = urpm::media::update_media($urpm, %options,
quiet => $options{verbose} < 0,
callback => \&urpm::download::sync_logger);
#- try to umount removable device which may have been mounted.
urpm::removable::try_umounting_removables($urpm);
+ exit $ok ? 0 : 1;
}