diff options
author | Francois Pons <fpons@mandriva.com> | 2003-05-26 15:27:50 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-05-26 15:27:50 +0000 |
commit | f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6 (patch) | |
tree | b7438b732dffc7c881a735f98d73d9dd2093067c | |
parent | d3c407ef588472520fbafa1d140e6ceff0726c37 (diff) | |
download | urpmi-f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6.tar urpmi-f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6.tar.gz urpmi-f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6.tar.bz2 urpmi-f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6.tar.xz urpmi-f51ab4206f9e9bb149c8ce4ee0d1bbbecbcd5fc6.zip |
4.3-12mdk
-rw-r--r-- | po/fr.po | 2 | ||||
-rw-r--r-- | urpm.pm | 17 | ||||
-rw-r--r-- | urpme | 2 | ||||
-rwxr-xr-x | urpmi | 30 | ||||
-rw-r--r-- | urpmi.spec | 6 | ||||
-rwxr-xr-x | urpmq | 3 |
6 files changed, 35 insertions, 25 deletions
@@ -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 ?" @@ -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. @@ -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) "); @@ -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, @@ -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). @@ -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"; } } |