summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-09 10:05:35 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-09 10:05:35 +0000
commitc7f4ce54151d794e7f67f2125e65709c35d0603b (patch)
treee32e98b0bd9a0cc700b331c872b2caab29b44743 /perl-install/install
parent5f65c1de209ed5aa69c62aef6b0aeb3f89721ecb (diff)
downloaddrakx-backup-do-not-use-c7f4ce54151d794e7f67f2125e65709c35d0603b.tar
drakx-backup-do-not-use-c7f4ce54151d794e7f67f2125e65709c35d0603b.tar.gz
drakx-backup-do-not-use-c7f4ce54151d794e7f67f2125e65709c35d0603b.tar.bz2
drakx-backup-do-not-use-c7f4ce54151d794e7f67f2125e65709c35d0603b.tar.xz
drakx-backup-do-not-use-c7f4ce54151d794e7f67f2125e65709c35d0603b.zip
(get_file_and_size) fix crashing when using urpmi early to download stuff for network installs
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/install/http.pm5
2 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index bdf27b88c..05864fc8f 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- media management:
+ o fix crashing when using urpmi early to download stuff for network installs
+
Version 12.26.1 - 08 April 2009
- media management:
diff --git a/perl-install/install/http.pm b/perl-install/install/http.pm
index 91b27601c..72ff053fb 100644
--- a/perl-install/install/http.pm
+++ b/perl-install/install/http.pm
@@ -37,6 +37,11 @@ sub get_file_and_size {
defined $host or return undef;
my $urpm = $::o->{packages};
+ if (!$urpm) {
+ require install::pkgs;
+ $urpm = install::pkgs::empty_packages($o->{keep_unrequested_dependencies});
+ }
+
my $cachedir = $urpm->{cachedir} || '/root';
my $file = $url;
$file =~ s!.*/!$cachedir/!;