summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-09-21 15:47:53 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.com>2006-09-21 15:47:53 +0000
commit8e1922a4447fd41b5cbd0fc1d0c0596b8808197e (patch)
tree0344ef848c2c431a8e821bf65bd2146729d9f5a6 /urpm.pm
parent7851ef7ca12a65857eb275995f1a7a0333daadad (diff)
downloadurpmi-8e1922a4447fd41b5cbd0fc1d0c0596b8808197e.tar
urpmi-8e1922a4447fd41b5cbd0fc1d0c0596b8808197e.tar.gz
urpmi-8e1922a4447fd41b5cbd0fc1d0c0596b8808197e.tar.bz2
urpmi-8e1922a4447fd41b5cbd0fc1d0c0596b8808197e.tar.xz
urpmi-8e1922a4447fd41b5cbd0fc1d0c0596b8808197e.zip
Add Prozilla support
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 8ca9994e..ef0a471f 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -72,12 +72,15 @@ sub sync_webfetch {
$urpm->{fatal}(10, $@) if $@;
delete @files{qw(removable file)};
}
- for my $cpt (qw(wget-options curl-options rsync-options)) {
+ for my $cpt (qw(wget-options curl-options rsync-options prozilla-options)) {
$options->{$cpt} = $urpm->{options}{$cpt} if defined $urpm->{options}{$cpt};
}
if ($files{ftp} || $files{http} || $files{https}) {
- my @webfetch = qw(curl wget);
- my @available_webfetch = grep { -x "/usr/bin/$_" || -x "/bin/$_" } @webfetch;
+ my @webfetch = qw(curl wget prozilla);
+ my %webfetch_executables = (curl => 'curl', wget => 'wget', prozilla => 'proz');
+ my @available_webfetch = grep {
+ -x "/usr/bin/$webfetch_executables{$_}" || -x "/bin/$webfetch_executables{$_}"
+ } @webfetch;
#- use user default downloader if provided and available
my $option_downloader = $urpm->{options}{downloader}; #- cmd-line switch
if (!$option_downloader && $options->{media}) { #- per-media config
@@ -98,6 +101,8 @@ sub sync_webfetch {
sync_curl($options, @{$files{ftp} || []}, @{$files{http} || []}, @{$files{https} || []});
} elsif ($preferred eq 'wget') {
sync_wget($options, @{$files{ftp} || []}, @{$files{http} || []}, @{$files{https} || []});
+ } elsif ($preferred eq 'prozilla') {
+ sync_prozilla($options, @{$files{ftp} || []}, @{$files{http} || []}, @{$files{https} || []});
} else {
die N("no webfetch found, supported webfetch are: %s\n", join(", ", @webfetch));
}
@@ -179,6 +184,7 @@ sub read_config {
curl-options
rsync-options
wget-options
+ prozilla-options
)) {
if (defined $config->{''}{$opt} && !exists $urpm->{options}{$opt}) {
$urpm->{options}{$opt} = $config->{''}{$opt};