summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-11 14:32:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-11 14:32:18 +0000
commitbed48b61dcbf06efd58657a86de131ac79fdde4f (patch)
tree54e994d461f73cdef7335049935c0b832dc7fc58 /urpm/select.pm
parent5c333601ac88827fe138450cd2282fdfda309b59 (diff)
downloadurpmi-bed48b61dcbf06efd58657a86de131ac79fdde4f.tar
urpmi-bed48b61dcbf06efd58657a86de131ac79fdde4f.tar.gz
urpmi-bed48b61dcbf06efd58657a86de131ac79fdde4f.tar.bz2
urpmi-bed48b61dcbf06efd58657a86de131ac79fdde4f.tar.xz
urpmi-bed48b61dcbf06efd58657a86de131ac79fdde4f.zip
- library:
o create urpm::select::conflicting_packages_msg() for rpmdrake
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 01e20d8f..c780b932 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -599,6 +599,24 @@ sub rejected_unsatisfied {
map { $_ ? @$_ : () } map { $_->{unsatisfied} } values %$closure;
}
+sub conflicting_packages_msg_ {
+ my ($urpm, $state, $removed_packages_msgs) = @_;
+
+ my $list = join("\n", @$removed_packages_msgs) or return;
+ @$removed_packages_msgs == 1 ?
+ N("The following package has to be removed for others to be upgraded:\n%s", $list)
+ : N("The following packages have to be removed for others to be upgraded:\n%s", $list);
+}
+sub conflicting_packages_msg {
+ my ($urpm, $state) = @_;
+ conflicting_packages_msg_($urpm, $state, [ removed_packages_msgs($urpm, $state) ]);
+}
+
+sub removed_packages_msgs {
+ my ($urpm, $state) = @_;
+ map { translate_why_removed_one($urpm, $state, $_) } sort(removed_packages($urpm, $state));
+}
+
sub translate_why_removed {
my ($urpm, $state, @fullnames) = @_;
join("\n", map { translate_why_removed_one($urpm, $state, $_) } sort @fullnames);