aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGustavo De Nardin <spuk@mandriva.org>2007-03-23 21:16:46 +0000
committerGustavo De Nardin <spuk@mandriva.org>2007-03-23 21:16:46 +0000
commit55398d96968ca129b0229f6087aa9bc393a881a4 (patch)
tree62a69077f97cdec290cb68c9c4ab451ececce9a5 /lib
parentc83fae60b22ba34e62fd00210143a92505233aa5 (diff)
downloadmga-youri-core-55398d96968ca129b0229f6087aa9bc393a881a4.tar
mga-youri-core-55398d96968ca129b0229f6087aa9bc393a881a4.tar.gz
mga-youri-core-55398d96968ca129b0229f6087aa9bc393a881a4.tar.bz2
mga-youri-core-55398d96968ca129b0229f6087aa9bc393a881a4.tar.xz
mga-youri-core-55398d96968ca129b0229f6087aa9bc393a881a4.zip
optimize next call to _get_section(), without using memoize evilness
Diffstat (limited to 'lib')
-rw-r--r--lib/Youri/Repository/Mandriva_upload.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm
index ae7581a..bfc4935 100644
--- a/lib/Youri/Repository/Mandriva_upload.pm
+++ b/lib/Youri/Repository/Mandriva_upload.pm
@@ -342,6 +342,10 @@ sub _get_section {
print STDERR "Can't guess destination: section missing, defaulting to contrib/release\n" unless $section;
$section ||= 'contrib/release';
+
+ # next time we don't need to search everything again
+ $self->{packages}{$file}{section} = $section;
+
return $section;
}