summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-05-15 09:06:12 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-05-15 09:06:12 +0000
commitcdf6aff0308da0b4446fe20d3bed751f74acf446 (patch)
tree25572889f224a20df524f4e66f302d282bcbd95f /urpm
parentfd6c5f2e98d67b394c92fc4a10133ef8e800a7a7 (diff)
downloadurpmi-cdf6aff0308da0b4446fe20d3bed751f74acf446.tar
urpmi-cdf6aff0308da0b4446fe20d3bed751f74acf446.tar.gz
urpmi-cdf6aff0308da0b4446fe20d3bed751f74acf446.tar.bz2
urpmi-cdf6aff0308da0b4446fe20d3bed751f74acf446.tar.xz
urpmi-cdf6aff0308da0b4446fe20d3bed751f74acf446.zip
Allow '--' in urpmf command-lines to search for patterns that begin with a '-'
(bug noticed by Titi)
Diffstat (limited to 'urpm')
-rw-r--r--urpm/args.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 21402463..5fc78e05 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -394,6 +394,20 @@ sub parse_cmdline {
$options{$k} = $args{defaults}{$k};
}
GetOptions(%{$options_spec{$tool}});
+ if ($tool eq 'urpmf' && @ARGV && $ARGV[0] eq '--') {
+ if (@ARGV == 2) {
+ my $p = $ARGV[1];
+ if ($::literal) {
+ $p = quotemeta $p;
+ } else {
+ $p =~ s/\+/\\+/g;
+ }
+ $::expr .= "m{$p}" . $::pattern;
+ }
+ else {
+ die N("Too many arguments\n");
+ }
+ }
}
1;