summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 9006bdb8..c911eff3 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2023,9 +2023,15 @@ this could happen if you mounted manually the directory when creating the medium
my $fh = $urpm->open_safe(">", "$urpm->{statedir}/names.$_->{name}");
if ($fh) {
foreach ($_->{start} .. $_->{end}) {
- print $fh $urpm->{depslist}[$_]->name . "\n";
+ if (defined $urpm->{depslist}[$_]) {
+ print $fh $urpm->{depslist}[$_]->name . "\n";
+ } else {
+ $urpm->{error}(N("Error generating names file: dependency %d not found", $_));
+ }
}
close $fh;
+ } else {
+ $urpm->{error}(N("Error generating names file: Can't write to file (%s)", $!));
}
}
}