summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-05 12:21:17 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-05 12:21:17 +0000
commit4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74 (patch)
tree72fe85d9f4d6c5dacc2d0a6eee69d47ded33276f /urpmq
parenta14c5cbcfa2e46f67bcef28ee906da22fa3eee80 (diff)
downloadurpmi-4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74.tar
urpmi-4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74.tar.gz
urpmi-4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74.tar.bz2
urpmi-4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74.tar.xz
urpmi-4f2f4aa7ae78aa7cf130b419c5ea1bf776cfde74.zip
3.4-4mdk final.
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq30
1 files changed, 19 insertions, 11 deletions
diff --git a/urpmq b/urpmq
index e408b8a5..84f351f3 100755
--- a/urpmq
+++ b/urpmq
@@ -18,7 +18,7 @@
#- this program is based upon urpmi.
-#use strict qw(subs vars refs);
+use strict;
use urpm;
# get I18N translation method.
@@ -115,14 +115,22 @@ $query->{verbose} or $urpm->{log} = sub {};
$urpm->configure(nocheck_access => 1,
media => $query->{media},
- update => $query->{update}
- @files > 0 ? (files => [ @files ]) : (),
+ update => $query->{update},
);
+
+my ($start, $end) = $urpm->register_rpms(@files);
+
+#- relocate depslist.
+$urpm->relocate_depslist_provides();
+
+#- select individual files.
+my %packages;
+@packages{($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.
-my %packages;
if (@names) {
$urpm->search_packages(\%packages, [ @names ],
use_provides => $query->{use_provides},
@@ -140,7 +148,7 @@ if (@src_names) {
#- open/close of database should be moved here, in order to allow testing
#- some bogus case and check for integrity.
if ($query->{auto_select} || $query->{deps}) {
- my $db = URPM::DB::open($root);
+ my $db = URPM::DB::open($query->{root});
my $sig_handler = sub { undef $db; exit 3 };
local $SIG{INT} = $sig_handler;
local $SIG{QUIT} = $sig_handler;
@@ -202,13 +210,13 @@ if ($query->{headers} || $query->{sources}) {
#- print sub for query.
my $query_sub = sub {
my ($id) = @_;
- my $info = $urpm->{params}{depslist}[$id];
+ my $pkg = $urpm->{depslist}[$id];
my $str = '';
- $query->{group} and $str .= $info->{group} . '/';
- $str .= $info->{name};
- $query->{version} and $str .= '-' . $info->{version};
- $query->{release} and $str .= '-' . $info->{release};
- $query->{arch} and $str .= '.' . $info->{arch};
+ $query->{group} and $str .= $pkg->group . '/';
+ $str .= $pkg->name;
+ $query->{version} and $str .= '-' . $pkg->version;
+ $query->{release} and $str .= '-' . $pkg->release;
+ $query->{arch} and $str .= '.' . $pkg->arch;
$str;
};