diff options
-rw-r--r-- | urpm.pm | 2 | ||||
-rwxr-xr-x | urpmi | 19 | ||||
-rw-r--r-- | urpmi.spec | 9 | ||||
-rwxr-xr-x | urpmq | 20 |
4 files changed, 25 insertions, 25 deletions
@@ -3,7 +3,7 @@ package urpm; use strict; use vars qw($VERSION @ISA); -$VERSION = '3.8'; +$VERSION = '3.9'; @ISA = qw(URPM); =head1 NAME @@ -279,22 +279,23 @@ if ($bug) { } #- select individual files. -my $state = { requested => {} }; -defined $start && defined $end and @{$state->{requested}}{($start .. $end)} = (); +my $state = {}; +my %requested; +defined $start && defined $end and @requested{($start .. $end)} = (1) x ($end-$start+1); #- search the packages according the selection given by the user, #- basesystem is added to the list so if it need to be upgraded, #- all its dependency will be updated too. #- make sure basesystem exists before. if (@names) { - $urpm->search_packages($state->{requested}, [ @names ], + $urpm->search_packages(\%requested, [ @names ], all => $all, use_provides => $use_provides, fuzzy => $fuzzy) or $force or exit 1; } if (@src_names) { - $urpm->search_packages($state->{requested}, [ @src_names ], + $urpm->search_packages(\%requested, [ @src_names ], all => $all, use_provides => $use_provides, fuzzy => $fuzzy, @@ -350,17 +351,13 @@ sub ask_choice { require URPM::Resolve; #- auto select package for upgrading the distribution. - if ($auto_select) { - my (%to_remove, %keep_files); + $auto_select and $urpm->request_packages_to_upgrade($db, $state, \%requested, requested => undef); - $urpm->resolve_packages_to_upgrade($db, $state, requested => undef); - } - - $urpm->resolve_requested($db, $state, callback_choices => \&ask_choice); + $urpm->resolve_requested($db, $state, \%requested, callback_choices => \&ask_choice); } if (%{$state->{ask_unselect} || {}}) { - my $list = join "\n", map { $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}}; + my $list = join "\n", map { scalar $urpm->{depslist}[$_]->fullname } keys %{$state->{ask_unselect}}; $noexpr = _("Nn"); $yesexpr = _("Yy"); message_input(_("Some package requested cannot be installed:\n%s\ndo you agree ?", $list) . _(" (Y/n) ")) =~ /[$noexpr]/ and exit 0; @@ -1,14 +1,14 @@ %define group System/Configuration/Packaging Name: urpmi -Version: 3.8 -Release: 3mdk +Version: 3.9 +Release: 1mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate Summary: User mode rpm install Requires: eject webfetch perl-DateManip >= 5.40 -PreReq: perl-Locale-gettext rpmtools >= 4.3-2mdk perl-URPM >= 0.11-2mdk +PreReq: perl-Locale-gettext rpmtools >= 4.3-2mdk perl-URPM >= 0.50 BuildRequires: bzip2-devel gcc-c++ gettext rpm-devel rpmtools BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch @@ -144,6 +144,9 @@ fi %changelog +* Tue Jul 23 2002 François Pons <fpons@mandrakesoft.com> 3.9-1mdk +- updated to use perl-URPM >= 0.50. + * Mon Jul 22 2002 François Pons <fpons@mandrakesoft.com> 3.8-3mdk - fixed ldconfig cannot be installed. - added translation support on error. @@ -141,7 +141,8 @@ $urpm->configure(nocheck_access => 1, ); -my $state = { requested => {} }; +my $state = {}; +my %requested; #- if list has been activated, select all... if ($query->{list}) { @@ -150,19 +151,19 @@ if ($query->{list}) { my ($start, $end) = $urpm->register_rpms(@files); #- select individual files. - defined $start && defined $end and @{$state->{requested}}{($start .. $end)} = (); + defined $start && defined $end and @requested{($start .. $end)} = (); #- search the packages according the selection given by the user, #- basesystem is added to the list so if it need to be upgraded, all its dependency #- will be updated too. if (@names) { - $urpm->search_packages($state->{requested}, [ @names ], + $urpm->search_packages(\%requested, [ @names ], use_provides => $query->{use_provides}, fuzzy => $query->{fuzzy}) or $query->{force} or exit 1; } if (@src_names) { - $urpm->search_packages($state->{requested}, [ @src_names ], + $urpm->search_packages(\%requested, [ @src_names ], use_provides => $query->{use_provides}, fuzzy => $query->{fuzzy}, src => 1) @@ -187,7 +188,7 @@ if ($query->{list}) { if ($query->{auto_select}) { my (%to_remove, %keep_files); - $urpm->resolve_packages_to_upgrade($db, $state, requested => 0); + $urpm->request_packages_to_upgrade($db, $state, \%requested, requested => 0); } #- filter to add in packages selected required packages. @@ -201,10 +202,9 @@ if ($query->{list}) { #- only deps required. my $empty_db = new URPM; #- URPM has same methods as URPM::DB and empty URPM will be seen as empty URPM::DB. require URPM::Resolve; - $urpm->resolve_requested($empty_db, $state, callback_choices => $stop_on_choices); - #$urpm->filter_packages_to_upgrade($db, $state->{requested}, undef, keep_alldeps => 1); + $urpm->resolve_requested($empty_db, $state, \%requested, callback_choices => $stop_on_choices); } else { - $state->{selected} = $state->{requested}; + $state->{selected} = \%requested; } #- get out of package that should not be upgraded. @@ -261,8 +261,8 @@ my $query_sub = sub { }; my %hack_only_one; -foreach my $id ($state->{selected} ? keys %{$state->{selected}} : keys %{$state->{requested}}) { - my $class = $state->{selected}{$id} || $state->{requested}{$id}; +foreach my $id ($state->{selected} ? keys %{$state->{selected}} : keys %requested) { + my $class = $state->{selected}{$id} || $requested{$id}; if (ref $class) { foreach my $choices (@{$class || []}) { exists $hack_only_one{$choices} and next; |