aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-06 14:14:17 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-06 14:14:17 +0000
commit1f84fde9f79576f90c27ac18cd299aed8154d283 (patch)
tree6fd5412109a7a3f62b3df96f89b5f3594ff41a98
parenta908eff5182f1774163abdc724b81885b4cdaebf (diff)
downloadrpmdrake-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.pm8
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: