summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-25 17:01:40 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-25 17:01:40 +0000
commit2e6d59119850d63ab417e5ab725ffdf34fb283fa (patch)
tree3c4b2f295b27743a4d42418bb92794fc1cacd6d3 /urpmq
parent2ba30f2e83f3a1f58a2ff75553ae2518d6f00730 (diff)
downloadurpmi-2e6d59119850d63ab417e5ab725ffdf34fb283fa.tar
urpmi-2e6d59119850d63ab417e5ab725ffdf34fb283fa.tar.gz
urpmi-2e6d59119850d63ab417e5ab725ffdf34fb283fa.tar.bz2
urpmi-2e6d59119850d63ab417e5ab725ffdf34fb283fa.tar.xz
urpmi-2e6d59119850d63ab417e5ab725ffdf34fb283fa.zip
Don't use 'and my'
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq7
1 files changed, 4 insertions, 3 deletions
diff --git a/urpmq b/urpmq
index 249a5afb..9f78a8cf 100755
--- a/urpmq
+++ b/urpmq
@@ -329,7 +329,8 @@ if ($urpm::args::options{list_aliases}) {
# get descriptions of update sources
my $updates_descr = $urpm->urpm::get_updates_description;
# if not root, use a temporary directory to store headers
- $< != 0 and my $tmp_header_dir = chomp_(`mktemp -d /tmp/urpmq.XXXXXX`);
+ my $tmp_header_dir = "$urpm->{cachedir}/headers";
+ $< != 0 and $tmp_header_dir = chomp_(`mktemp -d /tmp/urpmq.XXXXXX`);
foreach (0..$#{$urpm->{media} || []}) {
if ($urpm->{media}[$_]{synthesis}) {
$urpm->{log}->(N("skipping media %s: no hdlist\n", $urpm->{media}[$_]{name}));
@@ -347,7 +348,7 @@ if ($urpm::args::options{list_aliases}) {
: "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}",
quiet => 1,
);
- $packer->extract_archive($< == 0 ? "$urpm->{cachedir}/headers" : $tmp_header_dir, @headers);
+ $packer->extract_archive($tmp_header_dir, @headers);
} elsif (!%downloads) {
#- fallback to retrieve rpm package before, so that --headers will be ok.
%downloads = $urpm->download_source_packages({}, $list, force_local => 1);
@@ -410,7 +411,7 @@ if ($urpm::args::options{list_aliases}) {
}
}
}
- -d $tmp_header_dir and rmdir $tmp_header_dir;
+ -d $tmp_header_dir && $< != 0 and rmdir $tmp_header_dir;
} elsif ($urpm::args::options{sources}) {
print join "\n", values %$local_sources; values %$local_sources and print "\n";
foreach (0..$#{$urpm->{media} || []}) {