summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2012-04-19 08:41:37 +0000
committerOlivier Blin <blino@mageia.org>2012-04-19 08:41:37 +0000
commite57acaeacca87b9420eecc48647271d117c831b8 (patch)
tree6032ca61811c31c700052bb40bd67863365aafa8
parent7429573fe5dd752583c5da849deeea4b1eab7eec (diff)
downloadurpmi-e57acaeacca87b9420eecc48647271d117c831b8.tar
urpmi-e57acaeacca87b9420eecc48647271d117c831b8.tar.gz
urpmi-e57acaeacca87b9420eecc48647271d117c831b8.tar.bz2
urpmi-e57acaeacca87b9420eecc48647271d117c831b8.tar.xz
urpmi-e57acaeacca87b9420eecc48647271d117c831b8.zip
urpmi: do not print orphans message when no package is orphan
-rw-r--r--NEWS2
-rw-r--r--urpm/orphans.pm6
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index ec149561..8ad26f23 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- urpmi:
+ o do not print orphans message when no package is orphan
- kill mdv reference in man pages (#5277)
Version 6.48 - 26 March 2012
diff --git a/urpm/orphans.pm b/urpm/orphans.pm
index 7aa6e790..62b0f79c 100644
--- a/urpm/orphans.pm
+++ b/urpm/orphans.pm
@@ -435,7 +435,7 @@ sub _get_now_orphans_raw_msg {
my ($urpm) = @_;
my $orphans = get_orphans($urpm);
- my @orphans = map { scalar $_->fullname } @$orphans or return '';
+ my @orphans = map { scalar $_->fullname } @$orphans or return;
(scalar(@orphans), add_leading_spaces(join("\n", sort @orphans)));
}
@@ -443,7 +443,7 @@ sub _get_now_orphans_raw_msg {
sub get_now_orphans_gui_msg {
my ($urpm) = @_;
- my ($count, $list) = _get_now_orphans_raw_msg($urpm);
+ my ($count, $list) = _get_now_orphans_raw_msg($urpm) or return;
join("\n",
P("The following package:\n%s\nis now orphaned.",
"The following packages:\n%s\nare now orphaned.", $count, $list),
@@ -456,7 +456,7 @@ sub get_now_orphans_gui_msg {
sub get_now_orphans_msg {
my ($urpm) = @_;
- my ($count, $list) = _get_now_orphans_raw_msg($urpm);
+ my ($count, $list) = _get_now_orphans_raw_msg($urpm) or return;
P("The following package:\n%s\nis now orphaned, if you wish to remove it, you can use \"urpme --auto-orphans\"",
"The following packages:\n%s\nare now orphaned, if you wish to remove them, you can use \"urpme --auto-orphans\"",
$count, $list) . "\n";