diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-12-08 16:27:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-12-08 16:27:53 +0000 |
commit | dc7a05051d98990d658078e59124147a02354888 (patch) | |
tree | 0642a67e2fe8cc5b371fa8f5439380b07309aa89 /mdkupdate | |
parent | 87cc5cc468f4596cc2e0890ec8a2e63854169dd4 (diff) | |
download | mgaonline-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-x | mdkupdate | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |