aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--Rpmdrake/pkg.pm17
2 files changed, 20 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 92eefd5b..02025caf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- basic managment of orphan packages (#43723):
+ o display them
+ o handle --auto_orphans option
- rpmdrake:
o remove short lived wait message when changing selected view to
some 'update' view (security/bugfix/...) since it's too fast
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 08b793fd..1412c243 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -694,6 +694,15 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
$gurpm = Rpmdrake::gurpm->new(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::main_window);
my $_gurpm_clean_guard = before_leaving { undef $gurpm };
my $something_installed;
+
+ if (@to_install && $::rpmdrake_options{auto_orphans}) {
+ urpm::orphans::compute_future_unrequested_orphans($urpm, $state);
+ if (my @orphans = map { scalar $_->fullname } @{$state->{orphans_to_remove}}) {
+ interactive_msg(N("Orphan packages"), 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"), scroll => 1);
+ }
+ }
my ($progress, $total, @rpms_upgrade);
my $transaction;
@@ -853,6 +862,14 @@ you may now inspect some in order to take actions:"),
statusbar_msg_remove($statusbar_msg_id); #- XXX maybe remove this
+ if ($exit_code == 0 && !$::rpmdrake_options{auto_orphans}) {
+ if (urpm::orphans::check_unrequested_orphans_after_auto_select($urpm)) {
+ if (my $msg = urpm::orphans::get_now_orphans_msg($urpm)) {
+ interactive_msg(N("Orphan packages"), $msg, scroll => 1);
+ }
+ }
+ }
+
return_with_exit_code:
return !($something_installed || scalar(@to_remove));
}