summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-07 15:51:22 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-07 15:51:22 +0000
commit65f7f175176b2aa78799976116786f0dbe6a11c3 (patch)
tree69a478abb2cf6fc612380e6d02c7148532818233
parent4c41abfd4a1c474f1165becc73525a769bf77f7e (diff)
downloadurpmi-65f7f175176b2aa78799976116786f0dbe6a11c3.tar
urpmi-65f7f175176b2aa78799976116786f0dbe6a11c3.tar.gz
urpmi-65f7f175176b2aa78799976116786f0dbe6a11c3.tar.bz2
urpmi-65f7f175176b2aa78799976116786f0dbe6a11c3.tar.xz
urpmi-65f7f175176b2aa78799976116786f0dbe6a11c3.zip
Better error message when rpm2header isn't installed
-rwxr-xr-xurpmq7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpmq b/urpmq
index 7062b13b..f8122663 100755
--- a/urpmq
+++ b/urpmq
@@ -307,8 +307,13 @@ if ($urpm::args::options{list_aliases}) {
unless ($local_sources || $list) {
$urpm->{fatal}(1, N("unable to get source packages, aborting"));
}
+ my $rpm2header = '/usr/bin/rpm2header';
# TODO rewrite rpm2header in perl
- values %$local_sources and system 'rpm2header', values %$local_sources;
+ -x $rpm2header
+ or $urpm->{fatal}(2, N("rpm2header utility not found, impossible to use the --header option"));
+ if (values %$local_sources) {
+ system $rpm2header, values %$local_sources;
+ }
foreach (0..$#{$urpm->{media} || []}) {
my @headers = (grep {
my $file = "$urpm->{cachedir}/headers/$_";