summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-11 14:51:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-11 14:51:43 +0000
commit687f8df851493677352fb0968c8f8e42140248ed (patch)
treea8ebfb1e306387691745fa8153abc28a0a7934e0
parentd698955cce0fcf0134584e9f1ff6711010838e95 (diff)
downloadurpmi-687f8df851493677352fb0968c8f8e42140248ed.tar
urpmi-687f8df851493677352fb0968c8f8e42140248ed.tar.gz
urpmi-687f8df851493677352fb0968c8f8e42140248ed.tar.bz2
urpmi-687f8df851493677352fb0968c8f8e42140248ed.tar.xz
urpmi-687f8df851493677352fb0968c8f8e42140248ed.zip
Add a quiet option to the API of specialized download routines
-rw-r--r--urpm.pm9
-rwxr-xr-xurpmi1
2 files changed, 7 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 032bc494..d64d62cb 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -988,14 +988,17 @@ sub _guess_pubkey_name {
#- Recognized options :
#- all : all medias are being rebuilt
#- callback : UI callback
+#- compress : use compressed download (for rsync)
#- forcekey : force retrieval of pubkey
#- force : try to force rebuilding base files (1) or hdlist from rpm files (2)
+#- limit_rate : download limit rate
#- noclean : keep old files in the header cache directory
#- nolock : don't lock the urpmi database
#- nomd5sum : don't verify MD5SUM of retrieved files
#- nopubkey : don't use rpm pubkeys
#- norebuild : don't try to rebuild hdlists from rpm headers
#- probe_with : probe synthesis or hdlist (or none)
+#- quiet : download hdlists quietly
#- ratio : use this compression ratio (with gzip, default is 4)
sub update_media {
my ($urpm, %options) = @_;
@@ -1530,7 +1533,7 @@ this could happen if you mounted manually the directory when creating the medium
$urpm->{sync}(
{
dir => "$urpm->{cachedir}/partial",
- quiet => 0,
+ quiet => $options{quiet},
limit_rate => $options{limit_rate},
compress => $options{compress},
callback => $options{callback},
@@ -1574,7 +1577,7 @@ this could happen if you mounted manually the directory when creating the medium
$urpm->{sync}(
{
dir => "$urpm->{cachedir}/partial",
- quiet => 0,
+ quiet => $options{quiet},
limit_rate => $options{limit_rate},
compress => $options{compress},
callback => $options{callback},
@@ -2797,7 +2800,7 @@ sub download_packages_of_distant_media {
$urpm->{sync}(
{
dir => "$urpm->{cachedir}/partial",
- quiet => 0,
+ quiet => $options{quiet},
limit_rate => $options{limit_rate},
resume => $options{resume},
compress => $options{compress},
diff --git a/urpmi b/urpmi
index 0bc1672e..9288c105 100755
--- a/urpmi
+++ b/urpmi
@@ -555,6 +555,7 @@ foreach my $set (@{$state->{transaction} || []}) {
\%transaction_sources,
\%error_sources,
verbose => $verbose > 0,
+ quiet => $verbose < 0,
limit_rate => $urpm->{options}{'limit-rate'},
compress => $urpm->{options}{compress},
resume => $urpm->{options}{resume},