summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 84a1e9c5..dde26d85 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -404,6 +404,10 @@ sub statedir_descriptions {
my ($urpm, $medium) = @_;
"$urpm->{statedir}/descriptions.$medium->{name}";
}
+sub statedir_names {
+ my ($urpm, $medium) = @_;
+ "$urpm->{statedir}/names.$medium->{name}";
+}
sub cachedir_hdlist {
my ($urpm, $medium) = @_;
"$urpm->{cachedir}/partial/$medium->{hdlist}";
@@ -1163,9 +1167,9 @@ sub generate_media_names {
#- make sure names files are regenerated.
foreach (@{$urpm->{media}}) {
- unlink "$urpm->{statedir}/names.$_->{name}";
+ unlink statedir_names($urpm, $_);
if (is_valid_medium($_)) {
- my $fh = $urpm->open_safe(">", "$urpm->{statedir}/names.$_->{name}");
+ my $fh = $urpm->open_safe(">", statedir_names($urpm, $_));
if ($fh) {
foreach ($_->{start} .. $_->{end}) {
if (defined $urpm->{depslist}[$_]) {