summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-06-24 12:52:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-06-24 12:52:44 +0000
commite56348bfb7ec9dbe40058ee8cd04366835984f7f (patch)
treeb0662c1e8502d637f39374dfadf4705fb6d840af
parentc4a9939768874cc640e541c1c212af13a4597c54 (diff)
downloadurpmi-e56348bfb7ec9dbe40058ee8cd04366835984f7f.tar
urpmi-e56348bfb7ec9dbe40058ee8cd04366835984f7f.tar.gz
urpmi-e56348bfb7ec9dbe40058ee8cd04366835984f7f.tar.bz2
urpmi-e56348bfb7ec9dbe40058ee8cd04366835984f7f.tar.xz
urpmi-e56348bfb7ec9dbe40058ee8cd04366835984f7f.zip
cleanup
-rw-r--r--urpm/media.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index b2c12378..711986a5 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -306,14 +306,14 @@ sub synthesis {
$medium->{name} && "synthesis.hdlist.$medium->{name}.cz";
}
-sub statedir_synthesis {
- my ($urpm, $medium) = @_;
- "$urpm->{statedir}/" . synthesis($medium);
-}
sub statedir_media_info_file {
my ($urpm, $medium, $prefix, $suffix) = @_;
$medium->{name} && "$urpm->{statedir}/$prefix.$medium->{name}$suffix";
}
+sub statedir_synthesis {
+ my ($urpm, $medium) = @_;
+ statedir_media_info_file($urpm, $medium, 'synthesis.hdlist', '.cz');
+}
sub statedir_descriptions {
my ($urpm, $medium) = @_;
statedir_media_info_file($urpm, $medium, 'descriptions', '');
@@ -355,7 +355,7 @@ sub any_media_info_file {
if (! -e $f) {
# in some weird cases (iso on disk), the hdlist is not available where it should be,
# but we can use the statedir copy
- $f = "$urpm->{statedir}/$prefix.$medium->{name}$suffix";
+ $f = statedir_media_info_file($urpm, $medium, $prefix, $suffix);
}
-e $f && $f;
@@ -1706,13 +1706,12 @@ sub _retrieve_media_info_file_and_check_MD5SUM {
sub _any_media_info__or_download {
my ($urpm, $medium, $prefix, $suffix, $quiet, $o_callback) = @_;
- my $name = "$prefix.$medium->{name}$suffix";
- my $f = "$urpm->{statedir}/$name";
+ my $f = statedir_media_info_file($urpm, $medium, $prefix, $suffix);
-s $f and return $f;
my $download_dir;
if (my $userdir = urpm::userdir($urpm)) {
- $f = "$userdir/$name";
+ $f = "$userdir/$prefix.$medium->{name}$suffix";
-s $f and return $f;
$download_dir = "$userdir/partial";