summaryrefslogtreecommitdiffstats
path: root/urpm/download.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/download.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/download.pm')
-rw-r--r--urpm/download.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/urpm/download.pm b/urpm/download.pm
index 57bd191b..0363f683 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -512,6 +512,30 @@ sub sync_ssh {
sync_rsync($options, @_);
}
+sub sync_prozilla {
+ -x "/usr/bin/proz" or die N("prozilla is missing\n");
+ my $options = shift;
+ $options = { dir => $options } if !ref $options;
+ #- force download to be done in cachedir to avoid polluting cwd.
+ (my $cwd) = getcwd() =~ /(.*)/;
+ chdir $options->{dir};
+ my $proz_command = join(" ", map { "'$_'" }
+ "/usr/bin/proz",
+ "--no-curses",
+ (defined $options->{'prozilla-options'} ? split /\s+/, $options->{'prozilla-options'} : ()),
+ @_
+ );
+ my $ret = system($proz_command);
+ chdir $cwd;
+ if ($ret) {
+ if ($? == -1) {
+ die N("Couldn't execute prozilla\n");
+ } else {
+ die N("prozilla failed: exited with %d or signal %d\n", $? >> 8, $? & 127);
+ }
+ }
+}
+
sub start_ssh_master {
my ($server, $user) = @_;
$server or return 0;