summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-04-25 16:36:10 +0000
committerFrancois Pons <fpons@mandriva.com>2003-04-25 16:36:10 +0000
commitf4f538e70ddeaf9683dd4c077fe6abd6af96b883 (patch)
tree15ea35f4ec34371153dd913b00404eaa67efb5f8 /urpmf
parent987fa75b771b75c23c7945cd0504cc5a62205b44 (diff)
downloadurpmi-f4f538e70ddeaf9683dd4c077fe6abd6af96b883.tar
urpmi-f4f538e70ddeaf9683dd4c077fe6abd6af96b883.tar.gz
urpmi-f4f538e70ddeaf9683dd4c077fe6abd6af96b883.tar.bz2
urpmi-f4f538e70ddeaf9683dd4c077fe6abd6af96b883.tar.xz
urpmi-f4f538e70ddeaf9683dd4c077fe6abd6af96b883.zip
4.3-8mdk
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf17
1 files changed, 12 insertions, 5 deletions
diff --git a/urpmf b/urpmf
index 28863d27..30fcbb15 100755
--- a/urpmf
+++ b/urpmf
@@ -28,6 +28,8 @@ usage:
", $urpm::VERSION) . N(" --help - print this help message.
") . N(" --update - use only update media.
") . N(" --media - use only the given media, separated by comma.
+") . N(" --excludemedia - do not use the given media, separated by comma.
+") . N(" --sortmedia - sort media according to substrings separated by comma.
") . N(" --synthesis - use the synthesis given instead of urpmi db.
") . N(" --verbose - verbose mode.
") . N(" --quiet - do not print tag name (default if no tag given on command
@@ -65,6 +67,8 @@ usage:
#- default options.
my $update = 0;
my $media = '';
+my $excludemedia = '';
+my $sortmedia = '';
my $synthesis = '';
my $verbose = 0;
my $quiet;
@@ -75,14 +79,15 @@ my (%params, %uniq);
#- parse arguments list.
my $expr;
-my @nextargv;
while (defined($_ = shift @ARGV)) {
/^--help$/ and do { usage; next };
/^--no-locales$/ and do { undef *N; undef *urpm::N; *N = *urpm::N = sub { sprintf(shift @_, @_) }; next };
/^--update$/ and do { $update = 1; next };
- /^--media$/ and do { push @nextargv, \$media; next };
- /^--mediums$/ and do { push @nextargv, \$media; next };
- /^--synthesis$/ and do { push @nextargv, \$synthesis; next };
+ /^--media$/ and do { $media = shift @ARGV; next };
+ /^--mediums$/ and do { $media = shift @ARGV; next };
+ /^--exclude-?media$/ and do { $excludemedia = shift @ARGV; next };
+ /^--sort-?media$/ and do { $sortmedia = shift @ARGV; next };
+ /^--synthesis$/ and do { $synthesis = shift @ARGV; next };
/^--verbose$/ and do { $verbose = 1; next };
/^--quiet$/ and do { $quiet = 1; next };
/^--uniq$/ and do { $uniq = 1; next };
@@ -97,7 +102,7 @@ while (defined($_ = shift @ARGV)) {
/^-u$/ and do { $uniq = 1; next };
/^-i$/ and do { $pattern = 'i'; next };
/^-f$/ and do { $full = 'full'; next };
- /^-e$/ and do { $expr .= '('.$_.')'; next };
+ /^-e$/ and do { $expr .= '('.(shift @ARGV).')'; next };
/^-a$/ and do { $expr .= ' && '; next };
/^-o$/ and do { $expr .= ' || '; next };
/^[!\(\)]$/ and do { $expr .= $_; next };
@@ -136,6 +141,8 @@ $@ and usage;
$urpm->configure(nocheck_access => 1, noskipping => 1,
media => $media,
+ excludemedia => $excludemedia,
+ sortmedia => $sortmedia,
synthesis => $synthesis,
update => $update,
callback => $callback,