summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-26 12:36:45 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-26 12:36:45 +0000
commit18fe5ca41bcc0b0524b66214a2649785e93b33c5 (patch)
tree536b44e7dfd7d7b53cf045991843a4ee54f49beb
parent08d570db383c266a7ccbfab1272e38b72dc371e4 (diff)
downloadurpmi-18fe5ca41bcc0b0524b66214a2649785e93b33c5.tar
urpmi-18fe5ca41bcc0b0524b66214a2649785e93b33c5.tar.gz
urpmi-18fe5ca41bcc0b0524b66214a2649785e93b33c5.tar.bz2
urpmi-18fe5ca41bcc0b0524b66214a2649785e93b33c5.tar.xz
urpmi-18fe5ca41bcc0b0524b66214a2649785e93b33c5.zip
Don't expand .urpmi files on command-line in restricted mode
-rwxr-xr-xurpmi16
1 files changed, 10 insertions, 6 deletions
diff --git a/urpmi b/urpmi
index 9288c105..5efc3a73 100755
--- a/urpmi
+++ b/urpmi
@@ -149,14 +149,18 @@ my $command_line = join " ", @ARGV;
my @ARGVcopy; # keep a copy, in case we have to restart
# Expand *.urpmi arguments
-foreach my $a (@ARGV) {
- if ($a =~ /\.urpmi$/) {
- push @ARGVcopy, split /\n/, cat_($a);
- } else {
- push @ARGVcopy, $a;
+if (grep { $_ eq '--restricted' } @ARGV) {
+ @ARGVcopy = @ARGV;
+} else {
+ foreach my $a (@ARGV) {
+ if ($a =~ /\.urpmi$/) {
+ push @ARGVcopy, split /\n/, cat_($a);
+ } else {
+ push @ARGVcopy, $a;
+ }
}
+ @ARGV = @ARGVcopy;
}
-@ARGV = @ARGVcopy;
# Parse command line options
urpm::args::parse_cmdline(urpm => $urpm);