diff options
Diffstat (limited to 'grpmi')
-rwxr-xr-x | grpmi/grpmi.pl | 12 |
1 files changed, 8 insertions, 4 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); |