aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-02-13 14:31:52 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-02-13 14:31:52 +0000
commitef5d4874ed831dfcdc342d4ca3c52e742686d974 (patch)
tree95c8985275ab5eceddb0b1620d14364d4e5fbbff
parentc5fb5c87196b48013fc582c0ca725dc538c65b1c (diff)
downloadrpmdrake-ef5d4874ed831dfcdc342d4ca3c52e742686d974.tar
rpmdrake-ef5d4874ed831dfcdc342d4ca3c52e742686d974.tar.gz
rpmdrake-ef5d4874ed831dfcdc342d4ca3c52e742686d974.tar.bz2
rpmdrake-ef5d4874ed831dfcdc342d4ca3c52e742686d974.tar.xz
rpmdrake-ef5d4874ed831dfcdc342d4ca3c52e742686d974.zip
if there was an error during installation, propose to
remove the cached/downloaded packages or not (partially follows a nice suggestion by Jeff Martin <jeffm at tampabay.rr.com>)
-rwxr-xr-xgrpmi/grpmi.pl12
-rw-r--r--rpmdrake.spec7
2 files changed, 14 insertions, 5 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index d763e61e..f5be91cb 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -203,12 +203,16 @@ Install aborted.",
# -=-=-=---=-=-=---=-=-=-- cleanup -=-=-=---=-=-=--
$exitstatus = 0;
-$mainw->{rwindow}->hide;
cleanup:
if (!member('noclearcache', @grpmi_config)) {
- foreach (@ARGV) {
- s/^-skipped&([^&]+)&$/$1/;
- /^\Q$cache_location/ and unlink;
+ my @toclean = map { s/^-skipped&([^&]+)&$/$1/; if_(/^\Q$cache_location/, $_) } @ARGV;
+ if ($forced_exitstatus || $exitstatus) {
+ interactive_msg(_("Cleanup"),
+_("Cleanup question: there was an error during installation, do you want to
+remove the %d downloaded package(s)?
+(they are located in %s)", scalar(@toclean), $cache_location), 1) or goto exiting;
}
+ unlink @toclean;
}
+exiting:
mexit($forced_exitstatus || $exitstatus);
diff --git a/rpmdrake.spec b/rpmdrake.spec
index 6b67d3cd..f0d67b86 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -8,7 +8,7 @@
%define name rpmdrake
%define version 2.1
-%define release 5mdk
+%define release 6mdk
Name: %{name}
Version: %{version}
@@ -116,6 +116,11 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*.pm
%changelog
+* Thu Feb 13 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-6mdk
+- grpmi: if there was an error during installation, propose to
+ remove the cached/downloaded packages or not (partially follows
+ a nice suggestion by Jeff Martin <jeffm at tampabay.rr.com>)
+
* Tue Feb 11 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-5mdk
- rpmdrake:
- mark version as 9.1