diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-15 14:41:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-15 14:41:19 +0000 |
commit | 9e8d18ea6ec624dc03e92d3d9032daab3e2c197c (patch) | |
tree | 7c1b333a7c7bad3c72de15988b5fdb47075c1a32 | |
parent | 80e70c9089de72d473a7b9e0893cb0a49bc0f599 (diff) | |
download | urpmi-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.pm | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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}[$_]) { |