summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 17:07:37 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 17:07:37 +0000
commitc4c74f75eb386504370ffdca8e2f119a55ada108 (patch)
tree12c28647ce61a4778ee22473c8e2c118248247b3
parent51e9899db39713c606f51c02990544a5f82efad9 (diff)
downloadurpmi-c4c74f75eb386504370ffdca8e2f119a55ada108.tar
urpmi-c4c74f75eb386504370ffdca8e2f119a55ada108.tar.gz
urpmi-c4c74f75eb386504370ffdca8e2f119a55ada108.tar.bz2
urpmi-c4c74f75eb386504370ffdca8e2f119a55ada108.tar.xz
urpmi-c4c74f75eb386504370ffdca8e2f119a55ada108.zip
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
-rwxr-xr-xurpmi14
1 files 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;