diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-03 12:51:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-03 12:51:00 +0000 |
commit | 2aef19c4c0fd38641ccc54bd5946dd3103743749 (patch) | |
tree | 582c10d5af02e4f2a821cd6b01b4ab0ef284e1a3 /urpm | |
parent | df7a78fa5d2b71afe1d7665671f11979d035b466 (diff) | |
download | urpmi-2aef19c4c0fd38641ccc54bd5946dd3103743749.tar urpmi-2aef19c4c0fd38641ccc54bd5946dd3103743749.tar.gz urpmi-2aef19c4c0fd38641ccc54bd5946dd3103743749.tar.bz2 urpmi-2aef19c4c0fd38641ccc54bd5946dd3103743749.tar.xz urpmi-2aef19c4c0fd38641ccc54bd5946dd3103743749.zip |
- create _synthesis_dir_rel() out of _synthesis_dir()
- fix typo in previous commit
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/media.pm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index 3cb58a5d..f23e2780 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -282,14 +282,20 @@ sub _url_with_synthesis_basename { ? basename($medium->{with_synthesis}) : 'synthesis.hdlist.cz'; } -sub _synthesis_dir { +sub _synthesis_dir_rel { my ($medium) = @_; $medium->{'no-media-info'} || $medium->{unknown_media_info} and return; - my $base = file_from_local_medium($medium) || $medium->{url}; $medium->{with_synthesis} - ? reduce_pathname("$base/$medium->{with_synthesis}/..") - : $medium->{media_info_dir} && reduce_pathname("$base/$medium->{media_info_dir}"); + ? "$medium->{with_synthesis}/.." + : $medium->{media_info_dir}; +} +sub _synthesis_dir { + my ($medium) = @_; + my $rel = _synthesis_dir_rel($medium); + + my $base = file_from_local_medium($medium) || $medium->{url}; + reduce_pathname("$base/$rel"); } # the difference between _valid_synthesis_dir and _synthesis_dir @@ -1014,7 +1020,7 @@ sub may_reconfig_urpmi { $f = reduce_pathname("$dir/reconfig.urpmi"); } else { unlink($f = "$urpm->{cachedir}/partial/reconfig.urpmi"); - urpm::download::sync_rel($urpm, $medium, 'reconfig.urpmi') ], quiet => 1); + urpm::download::sync_rel($urpm, $medium, [ 'reconfig.urpmi' ], quiet => 1); } if (-s $f) { reconfig_urpmi($urpm, $f, $medium); |