summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-08 16:27:53 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-08 16:27:53 +0000
commitdc7a05051d98990d658078e59124147a02354888 (patch)
tree0642a67e2fe8cc5b371fa8f5439380b07309aa89 /mdkupdate
parent87cc5cc468f4596cc2e0890ec8a2e63854169dd4 (diff)
downloadmgaonline-dc7a05051d98990d658078e59124147a02354888.tar
mgaonline-dc7a05051d98990d658078e59124147a02354888.tar.gz
mgaonline-dc7a05051d98990d658078e59124147a02354888.tar.bz2
mgaonline-dc7a05051d98990d658078e59124147a02354888.tar.xz
mgaonline-dc7a05051d98990d658078e59124147a02354888.zip
log more stuff
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdkupdate b/mdkupdate
index c91e8bf7..8b8a5ec2 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -85,17 +85,20 @@ my $in;
$noX and $in = interactive->vnew;
--e $logfile and system "/bin/rm", $logfile;
+-e $logfile and rm_rf($logfile);
my $ret = update_pkgs();
- $ret == 1 or output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade");
+ if ($ret != 1) {
+ output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade");
+ log::explanations("[mdkupdate] Error 100: Packages failed to upgrade");
+ }
clean_dir();
sub update_pkgs {
my (@pkgs) = @_;
eval {
- system '/usr/sbin/urpmi', '--auto-update', '--auto', '--keep', '--update', map { if_(/(.*)-[^-]*-[^-]*\.[^-.]*?\.rpm$/, $1) } @pkgs;
+ run_program::run('/usr/sbin/urpmi', '--auto-update', '--auto', '--keep', '--update', map { if_(/(.*)-[^-]*-[^-]*\.[^-.]*?\.rpm$/, $1) } @pkgs);
$? == 0 or die N("Unable to update packages from update_source medium.\n");
};
$@ and output_p($logfile, "[mdkupdate] Error 99: $@"), return 0;