summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/install.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index ec069548..3c0e91f3 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -194,7 +194,7 @@ sub install {
my $cachefile = "$urpm->{cachedir}/rpms/" . $pkg->filename;
if (-e $cachefile) {
$urpm->{error}(N("removing bad rpm (%s) from %s", $pkg->name, "$urpm->{cachedir}/rpms"));
- unlink $cachefile;
+ unlink $cachefile or $urpm->{fatal}(1, N("removing %s failed: %s", $cachefile, $!));
}
}
}
@@ -250,7 +250,9 @@ sub install {
my $cachedir = "$urpm->{cachedir}/rpms";
my @pkgs = grep { -e "$cachedir/$_" } map { $_->filename } @trans_pkgs;
$urpm->{log}(N("removing installed rpms (%s) from %s", join(' ', @pkgs), $cachedir));
- unlink "$cachedir/$_" foreach @pkgs;
+ foreach (@pkgs) {
+ unlink "$cachedir/$_ " or $urpm->{fatal}(1, N("removing %s failed: %s", $_, $!));
+ }
}
if ($options{verbose} >= 0) {