summaryrefslogtreecommitdiffstats
path: root/urpmq
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 /urpmq
parent10811b93988e89d4e367b9c8b2074c5dbc3d1cce (diff)
downloadurpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.gz
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.bz2
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.tar.xz
urpmi-baf646d6ee859baef78b1bd11939a953b64be7c9.zip
3.9-1mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq20
1 files changed, 10 insertions, 10 deletions
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;