diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-06 11:24:33 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-12-06 11:24:33 +0000 |
commit | 4694b225b75f066ca3547d633371991d32afdfe2 (patch) | |
tree | c496f41721570a2e31889dd6ddf8fff3d694eb91 /urpmq | |
parent | 0e6d15ea2ae57afbd13a07a3a435f2b76e85a559 (diff) | |
download | urpmi-4694b225b75f066ca3547d633371991d32afdfe2.tar urpmi-4694b225b75f066ca3547d633371991d32afdfe2.tar.gz urpmi-4694b225b75f066ca3547d633371991d32afdfe2.tar.bz2 urpmi-4694b225b75f066ca3547d633371991d32afdfe2.tar.xz urpmi-4694b225b75f066ca3547d633371991d32afdfe2.zip |
Drop the urpmq --headers options (and the requirement on rpmtools). It
was only used by the late rpminst.
Diffstat (limited to 'urpmq')
-rwxr-xr-x | urpmq | 54 |
1 files changed, 2 insertions, 52 deletions
@@ -59,8 +59,6 @@ usage: ") . N(" --list-aliases - list available parallel aliases. ") . N(" --dump-config - dump the config in form of urpmi.addmedia argument. ") . N(" --src - next package is a source package (same as -s). -") . N(" --headers - extract headers for package listed from urpmi db to - stdout (root only). ") . N(" --sources - give all source packages before downloading (root only). ") . N(" --force - force invocation even if some packages do not exist. ") . N(" --parallel - distributed urpmi across machines of alias. @@ -294,8 +292,7 @@ if ($urpm::args::options{list_aliases}) { $state->{selected} = \%requested; } - if ($urpm::args::options{headers} - || $urpm::args::options{sources} + if ( $urpm::args::options{sources} || $urpm::args::options{info} || $urpm::args::options{summary} || $urpm::args::options{list_files} @@ -303,53 +300,7 @@ if ($urpm::args::options{list_aliases}) { { my ($local_sources, $list) = $urpm->get_source_packages($state->{selected}); - if ($urpm::args::options{headers}) { - #- now examine source package to build headers list to extract. - unless ($local_sources || $list) { - $urpm->{fatal}(1, N("unable to get source packages, aborting")); - } - my $rpm2header = '/usr/bin/rpm2header'; - # TODO rewrite rpm2header in perl - -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/$_"; - if (-s $file) { - my $fh; open $fh, '<', $file and do { - while (<$fh>) { print STDOUT $_ } - close $fh; - }; - } - ! -s $file; - } map { m|(.*)/([^/]*)-([^-]*)-([^-]*)\.([^\.]*)\.rpm| and "$2-$3-$4.$5" } values %{$list->[$_]}); - @headers > 0 or next; - - if (-s "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}") { - require MDV::Packdrakeng; - my $packer = MDV::Packdrakeng->open( - archive => ( - $urpm->{media}[$_]{virtual} - ? ("$urpm->{media}[$_]{url}/$urpm->{media}[$_]{with_hdlist}" =~ m!^(?:file:/*)?(/[^/].*)!)[0] - : "$urpm->{statedir}/$urpm->{media}[$_]{hdlist}", - ), - quiet => 1, - ); - defined $packer or do { - warn "Can't open archive: $MDV::Packdrakeng::error"; - exit 1; - }; - $packer->extract(undef, @headers); - } else { - #- fallback to retrieve rpm package before, so that --headers will be ok. - my %downloads = $urpm->download_source_packages({}, $list, force_local => 1); - system $rpm2header, values %downloads; - } - } - } elsif ($urpm::args::options{info} || $urpm::args::options{list_files} || $urpm::args::options{changelog} + if ($urpm::args::options{info} || $urpm::args::options{list_files} || $urpm::args::options{changelog} || $urpm::args::options{summary}) { my %downloads; # get descriptions of update sources @@ -380,7 +331,6 @@ if ($urpm::args::options{list_aliases}) { }; $packer->extract($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); } } |