diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-26 12:36:45 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-26 12:36:45 +0000 |
commit | 18fe5ca41bcc0b0524b66214a2649785e93b33c5 (patch) | |
tree | 536b44e7dfd7d7b53cf045991843a4ee54f49beb | |
parent | 08d570db383c266a7ccbfab1272e38b72dc371e4 (diff) | |
download | urpmi-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-x | urpmi | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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); |