summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-15 14:41:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-15 14:41:19 +0000
commit9e8d18ea6ec624dc03e92d3d9032daab3e2c197c (patch)
tree7c1b333a7c7bad3c72de15988b5fdb47075c1a32
parent80e70c9089de72d473a7b9e0893cb0a49bc0f599 (diff)
downloadurpmi-9e8d18ea6ec624dc03e92d3d9032daab3e2c197c.tar
urpmi-9e8d18ea6ec624dc03e92d3d9032daab3e2c197c.tar.gz
urpmi-9e8d18ea6ec624dc03e92d3d9032daab3e2c197c.tar.bz2
urpmi-9e8d18ea6ec624dc03e92d3d9032daab3e2c197c.tar.xz
urpmi-9e8d18ea6ec624dc03e92d3d9032daab3e2c197c.zip
create statedir_names and use it
-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}[$_]) {