diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-25 18:48:01 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-11-25 18:48:01 +0000 |
commit | 329dcd6b56fa3ceeee7f8315f03ab86a88eee156 (patch) | |
tree | 9b2e8866ccd7057cc291d828699e29a8e0a54ceb /urpmq | |
parent | d3b77cf910b88e2835d25313a29ab59e9b4b1928 (diff) | |
download | urpmi-329dcd6b56fa3ceeee7f8315f03ab86a88eee156.tar urpmi-329dcd6b56fa3ceeee7f8315f03ab86a88eee156.tar.gz urpmi-329dcd6b56fa3ceeee7f8315f03ab86a88eee156.tar.bz2 urpmi-329dcd6b56fa3ceeee7f8315f03ab86a88eee156.tar.xz urpmi-329dcd6b56fa3ceeee7f8315f03ab86a88eee156.zip |
Make urpmq work as non-root users when informations from rpm headers are
requested.
Diffstat (limited to 'urpmq')
-rwxr-xr-x | urpmq | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -331,6 +331,7 @@ if ($urpm::args::options{list_aliases}) { # if not root, use a temporary directory to store headers my $tmp_header_dir = "$urpm->{cachedir}/headers"; $< != 0 and $tmp_header_dir = chomp_(`mktemp -d /tmp/urpmq.XXXXXX`); + my @selected = map { split /\|/ } keys %{$state->{selected}}; foreach (0..$#{$urpm->{media} || []}) { if ($urpm->{media}[$_]{synthesis}) { $urpm->{log}->(N("skipping media %s: no hdlist\n", $urpm->{media}[$_]{name})); @@ -338,7 +339,7 @@ if ($urpm::args::options{list_aliases}) { } if (my @headers = (grep { ! -s "$urpm->{cachedir}/headers/$_" } map { my $pkg = $urpm->{depslist}[$_]; - $pkg && $pkg->header_filename } keys %{$list->[$_]})) + $pkg && $pkg->header_filename } @selected)) { if (-s "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}") { require packdrake; @@ -358,6 +359,7 @@ if ($urpm::args::options{list_aliases}) { foreach (keys %{$state->{selected}}) { foreach (split /\|/, $_) { my $pkg = $urpm->{depslist}[$_] or next; + #- even if non-root, search for a header in the global cachedir my $file = $local_sources->{$_} || $downloads{$_} || "$urpm->{cachedir}/headers/".$pkg->header_filename; if (-s $file) { $pkg->update_header($file, keep_all_tags => 1); |