summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-07-23 13:41:56 +0000
committerFrancois Pons <fpons@mandriva.com>2002-07-23 13:41:56 +0000
commitbaf646d6ee859baef78b1bd11939a953b64be7c9 (patch)
tree6293ac3faed43dd05bba201c7c263204f6f6eec8
parent10811b93988e89d4e367b9c8b2074c5dbc3d1cce (diff)
downloadurpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.gz
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.bz2
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.xz
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.zip
3.9-1mdk
-rw-r--r--urpm.pm2
-rwxr-xr-xurpmi19
-rw-r--r--urpmi.spec9
-rwxr-xr-xurpmq20
4 files changed, 25 insertions, 25 deletions
diff --git a/urpm.pm b/urpm.pm
index 68f4cbe7..ffe4bbfe 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -3,7 +3,7 @@ package urpm;
use strict;
use vars qw($VERSION @ISA);
-$VERSION = '3.8';
+$VERSION = '3.9';
@ISA = qw(URPM);
=head1 NAME
diff --git a/urpmi b/urpmi
index 35576798..f8e15e8c 100755
--- a/urpmi
+++ b/urpmi
@@ -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;
diff --git a/urpmi.spec b/urpmi.spec
index 2775b269..def19fbc 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -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.
diff --git a/urpmq b/urpmq
index 900980d4..5abff0f2 100755
--- a/urpmq
+++ b/urpmq
@@ -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;