aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-22 21:01:00 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-22 21:01:00 +0000
commit99a6d9c6f8b8b43e47c4238ccc322bd355e0b238 (patch)
treeb9e28a3c39ad091412f63386b85526878af329ee
parent0ee142a69df505b16bbf90e8cc52c1e8d21ac71d (diff)
downloadrpmdrake-99a6d9c6f8b8b43e47c4238ccc322bd355e0b238.tar
rpmdrake-99a6d9c6f8b8b43e47c4238ccc322bd355e0b238.tar.gz
rpmdrake-99a6d9c6f8b8b43e47c4238ccc322bd355e0b238.tar.bz2
rpmdrake-99a6d9c6f8b8b43e47c4238ccc322bd355e0b238.tar.xz
rpmdrake-99a6d9c6f8b8b43e47c4238ccc322bd355e0b238.zip
(mirrors) reindent for readability
-rw-r--r--rpmdrake.pm21
1 files changed, 11 insertions, 10 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index dc7ea1b6..ab23c11e 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -502,16 +502,17 @@ sub mirrors {
my ($urpm, $want_base_distro) = @_;
my $cachedir = $urpm->{cachedir} || '/root';
require mirror;
- mirror::register_downloader(sub {
- my ($url) = @_;
- my $file = $url;
- $file =~ s!.*/!$cachedir/!;
- unlink $file; # prevent "partial file" errors
- before_leaving(sub { unlink $file });
- my $res = urpm::download::sync($urpm, undef, [ $url ], dir => $cachedir);
- $res or do { c::set_tagged_utf8($res); die $res };
- return cat_($file);
- });
+ mirror::register_downloader(
+ sub {
+ my ($url) = @_;
+ my $file = $url;
+ $file =~ s!.*/!$cachedir/!;
+ unlink $file; # prevent "partial file" errors
+ before_leaving(sub { unlink $file });
+ my $res = urpm::download::sync($urpm, undef, [ $url ], dir => $cachedir);
+ $res or do { c::set_tagged_utf8($res); die $res };
+ return cat_($file);
+ });
my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')), 'distrib') || [] };
require timezone;
my $tz = ${timezone::read()}{timezone};