summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-07 10:32:03 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-07 10:32:03 +0000
commit6727ec49877128200369488980b13c14dfd7ad72 (patch)
tree0eb01d26ebc12e51b706a4d7d335e05115fdbfa9
parent701b13d276584263d6d6502cb926d448e08c3a97 (diff)
downloadmgaonline-6727ec49877128200369488980b13c14dfd7ad72.tar
mgaonline-6727ec49877128200369488980b13c14dfd7ad72.tar.gz
mgaonline-6727ec49877128200369488980b13c14dfd7ad72.tar.bz2
mgaonline-6727ec49877128200369488980b13c14dfd7ad72.tar.xz
mgaonline-6727ec49877128200369488980b13c14dfd7ad72.zip
(fork_gurpmi,harvester,upgrade) keep update log around and tell users
where they are if upgrade failed
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet10
2 files changed, 9 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2a9fe83a..05e034a2 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Version 2.51 - 6 October 2008
- mdkapplet
o display a success or an error message at end of installation
+ o keep update log and tell users where they are if upgrade failed
o make "Distro Upgrade" confirmation dialog wider
o run gurpmi with --replacefiles option (so that temporary file
conflicts doesn't break upgrade due to missing conflict tags)
diff --git a/mdkapplet b/mdkapplet
index 92775f1f..21c38896 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -54,7 +54,7 @@ if (!find { $_ eq '--auto-update' } @ARGV) {
ugtk2::add_icon_path("/usr/share/mdkonline/pixmaps/");
my $online_site = "http://www.mandrivalinux.com/";
-my ($menu, $timeout, $network_timeout, $state_global, $sub_state);
+my ($menu, $timeout, $network_timeout, $state_global, $sub_state, $log_file);
my $localdir = "$ENV{HOME}/.MdkOnline";
my $localfile = "$localdir/mdkonline";
@@ -333,6 +333,7 @@ sub harvester {
if ($status) {
ugtk2::ask_warn(N("Error"),
N("Installation failed"),
+ N("Installation logs can be found in '%s'", $log_file)
);
} else {
ugtk2::ask_warn(N("Congratulations"),
@@ -441,13 +442,18 @@ sub upgrade() {
logIt("upgrading the whole system");
# rerun gurpmi in case there was an issue (with eg: big transactions:
$refork_gurpmi = 1;
+ {
+ # force PATH:
+ local $ENV{TMPDIR} = undef;
+ $log_file = chomp_(`mktemp -u -p $ENV{HOME}/ gurpmi_upgrade_to_2009.0_XXXXXXXX`) . '.log';
+ }
# we cannot use installUpdates() as MandrivaUpdate needs the media
# flaged as update (or else, we need to add a new option to MandrivaUpdate):
fork_gurpmi('--replacefiles');
}
sub fork_gurpmi {
- $mdv_update_pid = fork_exec('gurpmi', '--auto', '--auto-select',
+ $mdv_update_pid = fork_exec('gurpmi', '>>', $log_file, '--auto', '--auto-select',
if_($root, "--urpmi-root=$root"), @_);
}