From 6c979a1c4e12979a5f3f1182c3ad0734386a6c94 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 14 Sep 2007 13:13:36 +0000 Subject: selectPackage: - stop reporting false errors - much nicer error message --- perl-install/install/pkgs.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'perl-install/install') diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index 80aa95b92..b7414f8b2 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -268,10 +268,8 @@ sub selectPackage { my @l = $packages->resolve_requested($packages->{rpmdb}, $state, packageRequest($packages, $pkg) || {}, callback_choices => \&packageCallbackChoices); - if (!member($pkg, @l) && $state->{rejected}) { - log::l("ERROR: selecting " . $pkg->name . " failed"); - require Data::Dumper; - log::l(Data::Dumper::Dumper($state->{rejected})); + if (!exists $state->{selected}{$pkg->id}) { + log::l("ERROR: selecting " . $pkg->name . " failed: " . urpm::select::translate_why_unselected_one($packages, $state, scalar $pkg->fullname)); } if ($b_base) { -- cgit v1.2.1