diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-11-07 15:51:22 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-11-07 15:51:22 +0000 |
commit | 65f7f175176b2aa78799976116786f0dbe6a11c3 (patch) | |
tree | 69a478abb2cf6fc612380e6d02c7148532818233 /urpmq | |
parent | 4c41abfd4a1c474f1165becc73525a769bf77f7e (diff) | |
download | urpmi-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
Diffstat (limited to 'urpmq')
-rwxr-xr-x | urpmq | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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/$_"; |