summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--po/fr.po2
-rw-r--r--urpm.pm17
-rw-r--r--urpme2
-rwxr-xr-xurpmi30
-rw-r--r--urpmi.spec6
-rwxr-xr-xurpmq3
6 files changed, 35 insertions, 25 deletions
diff --git a/po/fr.po b/po/fr.po
index cbd94b9e..186f6b79 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1282,7 +1282,7 @@ msgid ""
"%s\n"
"do you agree ?"
msgstr ""
-"Certains paquetages demandés n'ont pu être installés\n"
+"Certains paquetages demandés ne peuvent pas être installés\n"
"%s\n"
"Etes vous d'accord ?"
diff --git a/urpm.pm b/urpm.pm
index 74af56d4..dae9bb61 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2667,7 +2667,7 @@ sub find_packages_to_remove {
$db->traverse_tag('name', [ $n ], sub {
my ($p) = @_;
$p->fullname eq $_ or return;
- $urpm->resolve_closure_ask_remove($db, $state, $p);
+ $urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;
$found = 1;
});
@@ -2679,7 +2679,7 @@ sub find_packages_to_remove {
$db->traverse_tag('name', [ $n ], sub {
my ($p) = @_;
join('-', ($p->fullname)[0..2]) eq $_ or return;
- $urpm->resolve_closure_ask_remove($db, $state, $p);
+ $urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;
$found = 1;
});
@@ -2691,7 +2691,7 @@ sub find_packages_to_remove {
$db->traverse_tag('name', [ $n ], sub {
my ($p) = @_;
join('-', ($p->fullname)[0..1]) eq $_ or return;
- $urpm->resolve_closure_ask_remove($db, $state, $p);
+ $urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;
$found = 1;
});
@@ -2702,7 +2702,7 @@ sub find_packages_to_remove {
$db->traverse_tag('name', [ $_ ], sub {
my ($p) = @_;
$p->name eq $_ or return;
- $urpm->resolve_closure_ask_remove($db, $state, $p);
+ $urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;
$found = 1;
});
@@ -2726,7 +2726,7 @@ sub find_packages_to_remove {
$db->traverse(sub {
my ($p) = @_;
$p->fullname =~ /$match/ or return;
- $urpm->resolve_closure_ask_remove($db, $state, $p);
+ $urpm->resolve_rejected($db, $state, $p, removed => 1);
push @m, scalar $p->fullname;
});
@@ -2742,7 +2742,7 @@ sub find_packages_to_remove {
}
#- check if something need to be removed.
- if ($options{callback_base} && %{$state->{ask_remove} || {}}) {
+ if ($options{callback_base} && %{$state->{rejected} || {}}) {
my @base = qw(basesystem);
my (@base_to_remove, %basepackages, %base);
@@ -2763,7 +2763,7 @@ sub find_packages_to_remove {
}
}
- foreach (keys %{$state->{ask_remove}}) {
+ foreach (grep { $state->{rejected}{$_}{removed} && !$state->{rejected}{$_}{obsoleted} } keys %{$state->{rejected}}) {
my $rn = $base{$_};
if ($rn) {
$$rn == 1 and push @base_to_remove, $_;
@@ -2775,8 +2775,7 @@ sub find_packages_to_remove {
|| return ();
}
}
-
- keys %{$state->{ask_remove}};
+ grep { $state->{rejected}{$_}{removed} && !$state->{rejected}{$_}{obsoleted} } keys %{$state->{rejected}};
}
#- remove packages from node as remembered according to resolving done.
diff --git a/urpme b/urpme
index 1a7f0356..6e4065d7 100644
--- a/urpme
+++ b/urpme
@@ -102,7 +102,7 @@ if ($test && $auto) {
} elsif (@toremove > @l && !$auto) {
my $sum = 0;
foreach (@toremove) {
- $sum += $state->{ask_remove}{$_}{size};
+ $sum += $state->{rejected}{$_}{size};
}
my $msg = N("To satisfy dependencies, the following packages are going to be removed (%d MB)", toMb($sum));
print STDOUT "$msg:\n" . join("\n", sort { $a cmp $b } @toremove) . "\n$askok" . N(" (Y/n) ");
diff --git a/urpmi b/urpmi
index e8265249..31dd8c3c 100755
--- a/urpmi
+++ b/urpmi
@@ -384,9 +384,15 @@ $urpm->resolve_dependencies($state, \%requested,
install_src => $install_src,
);
-if (%{$state->{ask_unselect} || {}}) {
+my @ask_unselect = grep { $state->{rejected}{$_}{backtrack} } keys %{$state->{rejected} || {}};
+if (@ask_unselect) {
unless ($auto) {
- my $list = join "\n", map { scalar $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}};
+ my $list = join "\n", map { my @froms = keys %{$state->{rejected}{$_}{backtrack}{closure} || {}};
+ my @unsatisfied = @{$state->{rejected}{$_}{backtrack}{unsatisfied} || []};
+ my $s = join ", ", ((map { N("due to missing %s", $_) } @froms),
+ (map { N("due to unsatisfied %s", $_) } @unsatisfied));
+ $_ . ($s ? " ($s)" : '');
+ } sort { $a cmp $b } @ask_unselect;
my $msg = N("Some package requested cannot be installed:\n%s\ndo you agree ?", $list);
if ($X) {
gmessage($msg);
@@ -397,13 +403,13 @@ if (%{$state->{ask_unselect} || {}}) {
message_input($msg . N(" (Y/n) ")) =~ /[$noexpr]/ and exit 0;
}
}
- delete @{$state->{selected}}{keys %{$state->{ask_unselect}}};
}
-if (%{$state->{ask_remove} || {}}) {
+my @ask_remove = grep { $state->{rejected}{$_}{removed} && !$state->{rejected}{$_}{obsoleted} } keys %{$state->{rejected} || {}};
+if (@ask_remove) {
unless ($auto) {
- my $list = join "\n", map { my ($from) = keys %{$state->{ask_remove}{$_}{closure}};
- my ($whyk) = keys %{$state->{ask_remove}{$_}{closure}{$from}};
- my ($whyv) = $state->{ask_remove}{$_}{closure}{$from}{$whyk};
+ my $list = join "\n", map { my ($from) = keys %{$state->{rejected}{$_}{closure}};
+ my ($whyk) = keys %{$state->{rejected}{$_}{closure}{$from}};
+ my ($whyv) = $state->{rejected}{$_}{closure}{$from}{$whyk};
my $frompkg = $urpm->{depslist}[$from];
my $s;
for ($whyk) {
@@ -426,7 +432,7 @@ if (%{$state->{ask_remove} || {}}) {
}
#- now insert the reason if available.
$_ . ($s ? " ($s)" : '');
- } sort { $a cmp $b } keys %{$state->{ask_remove}};
+ } sort { $a cmp $b } @ask_remove;
my $msg = N("The following packages have to be removed for others to be upgraded:\n%s\ndo you agree ?", $list);
if ($X) {
gmessage($msg);
@@ -593,7 +599,7 @@ if (%sources_install || %sources) {
message(N("distributing %s\n", join(' ', values %sources_install, values %sources)), 'noX');
#- no remove are handle here, automatically done by each distant node.
$urpm->{log}("starting distributed install");
- $urpm->parallel_install([ keys %{$state->{ask_remove} || {}} ], \%sources_install, \%sources,
+ $urpm->parallel_install([ keys %{$state->{rejected} || {}} ], \%sources_install, \%sources,
test => $test,
excludepath => $urpm->{options}{excludepath}, excludedocs => $urpm->{options}{excludedocs});
} else {
@@ -616,7 +622,7 @@ if (%sources_install || %sources) {
gurpm::progress($amount/$total);
}
};
- my @l = $urpm->install([ keys %{$state->{ask_remove} || {}} ], \%sources_install, \%sources,
+ my @l = $urpm->install(\@ask_remove, \%sources_install, \%sources,
translate_message => 1,
oldpackage => $state->{oldpackage}, post_clean_cache => $urpm->{options}{'post-clean'},
test => $test,
@@ -634,7 +640,7 @@ if (%sources_install || %sources) {
message_input(N("Try installation without checking dependencies? (y/N) "), $force && $yesexpr) =~ /[$yesexpr]/
or exit 1;
$urpm->{log}("starting installing packages without deps");
- @l = $urpm->install([ keys %{$state->{ask_remove} || {}} ], \%sources_install, \%sources,
+ @l = $urpm->install(\@ask_remove, \%sources_install, \%sources,
translate_message => 1, nodeps => 1,
oldpackage => $state->{oldpackage}, post_clean_cache => $urpm->{options}{'post-clean'},
test => $test,
@@ -645,7 +651,7 @@ if (%sources_install || %sources) {
message_input(N("Try installation even more strongly (--force)? (y/N) "), $force && $yesexpr) =~ /[$yesexpr]/
or exit 1;
$urpm->{log}("starting force installing packages without deps");
- @l = $urpm->install([ keys %{$state->{ask_remove} || {}} ], \%sources_install, \%sources,
+ @l = $urpm->install(\@ask_remove, \%sources_install, \%sources,
translate_message => 1, nodeps => 1, force => 1,
oldpackage => $state->{oldpackage}, post_clean_cache => $urpm->{options}{'post-clean'},
test => $test,
diff --git a/urpmi.spec b/urpmi.spec
index 0bad5c23..2f78fe97 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 4.3
-Release: 11mdk
+Release: 12mdk
License: GPL
Source0: %{name}.tar.bz2
Source1: %{name}.logrotate
@@ -202,6 +202,10 @@ $urpm->update_media;
%changelog
+* Mon May 26 2003 François Pons <fpons@mandrakesoft.com> 4.3-12mdk
+- updated for newer perl-URPM 0.90 series.
+- give reason of package requested not being installed.
+
* Fri May 16 2003 François Pons <fpons@mandrakesoft.com> 4.3-11mdk
- try to handle resume connection (do not always remove previous
download, only works for hdlist or synthesis using rsync).
diff --git a/urpmq b/urpmq
index cbd6fd60..217577a2 100755
--- a/urpmq
+++ b/urpmq
@@ -393,7 +393,8 @@ my $query_sub = sub {
my %hack_only_one;
if ($query->{complete}) {
- foreach my $removal (keys %{$state->{ask_remove} || {}}) {
+ foreach my $removal (grep { $state->{rejected}{$_}{removed} && !$state->{rejected}{$_}{obsoleted} }
+ keys %{$state->{rejected} || {}}) {
print '@removing@' . $removal . "\n";
}
}