diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-06 14:14:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-06 14:14:17 +0000 |
commit | 1f84fde9f79576f90c27ac18cd299aed8154d283 (patch) | |
tree | 6fd5412109a7a3f62b3df96f89b5f3594ff41a98 | |
parent | a908eff5182f1774163abdc724b81885b4cdaebf (diff) | |
download | rpmdrake-1f84fde9f79576f90c27ac18cd299aed8154d283.tar rpmdrake-1f84fde9f79576f90c27ac18cd299aed8154d283.tar.gz rpmdrake-1f84fde9f79576f90c27ac18cd299aed8154d283.tar.bz2 rpmdrake-1f84fde9f79576f90c27ac18cd299aed8154d283.tar.xz rpmdrake-1f84fde9f79576f90c27ac18cd299aed8154d283.zip |
(extract_header) do not perform slow extract if already performed
-rw-r--r-- | Rpmdrake/pkg.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index ed46174a..f4956bce 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -97,6 +97,14 @@ sub extract_header { #- preprocess changelog for faster TextView insert reaction [ map { [ "$spacing$_\n", if_(/^\*/, { 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD }) ] } split("\n", $_[0]) ]; }; + my %fields = ( + info => 'description', + files => 'files', + changelog => 'changelog', + ); + # already extracted: + return if $pkg->{$fields{$xml_info}}; + my $p = $pkg->{pkg}; my $name = urpm_name($p); # fix extracting info for SRPMS and RPM GPG keys: |