diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-05 10:33:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-05 10:33:39 +0000 |
commit | a1810a1e46c7395937e3d509b99c9b856fc28d5d (patch) | |
tree | 4a3819b6e9141b64bf077ca4271cbc394b8aa27b /urpm.pm | |
parent | 9912053d069dcd3cf6fb47b7ffe53fda2ca41ec3 (diff) | |
download | urpmi-a1810a1e46c7395937e3d509b99c9b856fc28d5d.tar urpmi-a1810a1e46c7395937e3d509b99c9b856fc28d5d.tar.gz urpmi-a1810a1e46c7395937e3d509b99c9b856fc28d5d.tar.bz2 urpmi-a1810a1e46c7395937e3d509b99c9b856fc28d5d.tar.xz urpmi-a1810a1e46c7395937e3d509b99c9b856fc28d5d.zip |
More error checking when generating names file
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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)", $!)); } } } |