From 18fe5ca41bcc0b0524b66214a2649785e93b33c5 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 26 Oct 2005 12:36:45 +0000 Subject: Don't expand .urpmi files on command-line in restricted mode --- urpmi | 16 ++++++++++------ 1 file 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); -- cgit v1.2.1