From c4c74f75eb386504370ffdca8e2f119a55ada108 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Fri, 20 Mar 2009 17:07:37 +0000 Subject: Remove remnants of --auto-orphans code I recently removed references to urpmi --auto-orphans from urpmi man pages, but in fact, the bug was that the option wasn't parsed, the rest of the code was here. However, given that many people are surprised by which packages get auto-orphaned, it's better if it's not possible for now to remove auto-orphaned packages at install time. This commit removes the auto-orphans code from urpmi --- urpmi | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/urpmi b/urpmi index fa5b0c70..6c74d67a 100755 --- a/urpmi +++ b/urpmi @@ -239,7 +239,7 @@ if ($restricted) { #- force some options foreach (qw(keep verify-rpm)) { $urpm->{options}{$_} = 1 } #- forbid some other options - urpm::error_restricted($urpm) if $urpm->{root} || $options{usedistrib} || $force || $env || $parallel || $options{synthesis} || $auto_update || $options{auto_orphans}; + urpm::error_restricted($urpm) if $urpm->{root} || $options{usedistrib} || $force || $env || $parallel || $options{synthesis} || $auto_update; foreach (qw(allow-nodeps allow-force curl-options rsync-options wget-options prozilla-options noscripts)) { urpm::error_restricted($urpm) if $urpm->{options}{$_}; } @@ -563,16 +563,6 @@ my @to_install = @{$urpm->{depslist}}[sort { $a <=> $b } keys %{$state->{selecte } } - -if (@to_install && $options{auto_orphans}) { - urpm::orphans::compute_future_unrequested_orphans($urpm, $state); - if (my @orphans = map { scalar $_->fullname } @{$state->{orphans_to_remove}}) { - print P("The following orphan package will be removed.", - "The following orphan packages will be removed.", scalar(@orphans)) - . "\n" . urpm::orphans::add_leading_spaces(join("\n", @orphans) . "\n"); - } -} - #- this cleans up the list of potential orphan packages: #- - if a package is explicitly requested on the command line, then #- we assume the user doesn't want this package to be auto orphaned @@ -664,7 +654,7 @@ my $exit_code = urpm::main_loop::run($urpm, $state, } }); -if ($exit_code == 0 && $auto_select && !$options{auto_orphans}) { +if ($exit_code == 0 && $auto_select) { if (urpm::orphans::check_unrequested_orphans_after_auto_select($urpm)) { if (my $msg = urpm::orphans::get_now_orphans_msg($urpm)) { print "\n", $msg; -- cgit v1.2.1