diff options
-rw-r--r-- | pod/urpmq.8.pod | 6 | ||||
-rw-r--r-- | urpm/args.pm | 1 | ||||
-rw-r--r-- | urpmi.bash-completion | 2 | ||||
-rw-r--r-- | urpmi.spec | 2 | ||||
-rwxr-xr-x | urpmq | 54 |
5 files changed, 3 insertions, 62 deletions
diff --git a/pod/urpmq.8.pod b/pod/urpmq.8.pod index db9aadae..2ae909ab 100644 --- a/pod/urpmq.8.pod +++ b/pod/urpmq.8.pod @@ -101,12 +101,6 @@ the specified name (this is the same as B<-y>). Search a source package matching I<name> and it will select all dependencies by default. -=item B<--headers> - -Extract -and dump headers of selected packages to standard output. (Can be used by -the superuser only.) - =item B<--sources> Prints source URLs (or file names) of all selected diff --git a/urpm/args.pm b/urpm/args.pm index 2a1be88f..fca6bb0e 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -213,7 +213,6 @@ my %options_spec = ( 'list-aliases' => \$options{list_aliases}, 'dump-config' => \$options{dump_config}, 'src|s' => \$options{src}, - headers => \$options{headers}, sources => \$options{sources}, force => \$options{force}, 'skip=s' => \$options{skip}, diff --git a/urpmi.bash-completion b/urpmi.bash-completion index eeccf144..53c0c5e9 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -134,7 +134,7 @@ _urpmq() -r -f -h -l --help --update --media --excludemedia \ --sortmedia --synthesis --auto-select --fuzzy --keep \ --list --list-url --list-media --list-nodes --list-aliases \ - --src --headers --sources --force --parallel --wget --curl \ + --src --sources --force --parallel --wget --curl \ --changelog --proxy --proxy-user --env --dump-config \ --use-distrib --searchmedia' -- $cur)) else @@ -31,8 +31,6 @@ Requires(pre): perl-URPM >= 1.22 Requires: perl-URPM >= 1.22 #- this one is require'd by urpmq, so it's not found [yet] by perl.req Requires: perl-MDV-Packdrakeng >= 1.01 -#- rpm2header is needed by urpmq -Requires: rpmtools >= 4.5 BuildRequires: bzip2-devel BuildRequires: gettext BuildRequires: perl-File-Slurp @@ -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); } } |