summaryrefslogtreecommitdiffstats
path: root/urpme
diff options
context:
space:
mode:
Diffstat (limited to 'urpme')
-rw-r--r--urpme20
1 files changed, 10 insertions, 10 deletions
diff --git a/urpme b/urpme
index 8c33a5dd..d853c137 100644
--- a/urpme
+++ b/urpme
@@ -31,7 +31,7 @@ use urpm::select;
$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
-our ($test, $parallel, $auto, $matches, $force, $noscripts, $repackage, $restricted);
+our ($test, $parallel, $force);
my $yesexpr =
#-PO: Add here the keys which might be pressed in the "Yes"-case.
N("Yy");
@@ -71,8 +71,8 @@ if ($< && !$test) {
}
#- rurpme checks
-if ($restricted) {
- urpm::error_restricted($urpm) if $urpm->{root} || $options{usedistrib} || $noscripts || $parallel;
+if ($options{restricted}) {
+ urpm::error_restricted($urpm) if $urpm->{root} || $options{usedistrib} || $urpm->{options}{noscripts} || $parallel;
}
unless ($test) {
@@ -92,7 +92,7 @@ urpm::media::configure($urpm,
my @toremove = urpm::select::find_packages_to_remove($urpm,
$state,
\@cmdline_pkgs_to_remove,
- matches => $matches,
+ matches => $options{matches},
force => $force,
callback_notfound => sub {
my $urpm = shift @_;
@@ -115,11 +115,11 @@ my @toremove = urpm::select::find_packages_to_remove($urpm,
) or $urpm->{fatal}(0, N("Nothing to remove"));
my $list = urpm::select::translate_why_removed($urpm, $state, @toremove);
-if ($test && $auto) {
+if ($test && $options{auto}) {
#- Warning : the following message is parsed in urpm::parallel_*
my $msg = N("Checking to remove the following packages");
print STDOUT "$msg:\n$list\n";
-} elsif (($parallel || @toremove > @cmdline_pkgs_to_remove) && !$auto) {
+} elsif (($parallel || @toremove > @cmdline_pkgs_to_remove) && !$options{auto}) {
my $msg =
P("To satisfy dependencies, the following package will be removed",
"To satisfy dependencies, the following %d packages will be removed",
@@ -135,15 +135,15 @@ my @errors = $parallel
\@toremove,
test => $test,
force => $force,
- noscripts => $noscripts,
- repackage => $repackage || $urpm->{options}{repackage},
+ noscripts => $urpm->{options}{noscripts},
+ repackage => $urpm->{options}{repackage},
)
: urpm::install::install($urpm,
\@toremove, {}, {},
test => $test,
force => $force,
- noscripts => $noscripts,
- repackage => $repackage || $urpm->{options}{repackage},
+ noscripts => $urpm->{options}{noscripts},
+ repackage => $urpm->{options}{repackage},
);
if (@errors) {