aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-21 00:04:47 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-21 00:04:47 +0000
commit3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603 (patch)
tree9873bdb234e2b5a8be3f3cba27dd47cf01f3fca4
parent6e1c3f46692061bf03dc37d47125818d29b2b957 (diff)
downloadrpmdrake-3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603.tar
rpmdrake-3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603.tar.gz
rpmdrake-3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603.tar.bz2
rpmdrake-3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603.tar.xz
rpmdrake-3ba1c3e5fa80c18d4ca3093cc31efea7e11dd603.zip
kill doble use
-rw-r--r--Rpmdrake/gui.pm1
-rw-r--r--Rpmdrake/pkg.pm3
2 files changed, 3 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index d197c645..e65811de 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -37,7 +37,6 @@ use Rpmdrake::formatting;
use Rpmdrake::init;
use Rpmdrake::icon;
use Rpmdrake::pkg;
-use Rpmdrake::icon;
use feature 'state';
our @EXPORT = qw(
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 4ed0d497..ea9e3e36 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -190,6 +190,9 @@ sub extract_header {
sub find_installed_version {
my ($p) = @_;
my @version;
+ # FIXME: make it faster
+ # 1) reuse $db if set
+ # 2) s/traverse_tag/traverse_tag_find/ and time it
open_rpm_db()->traverse_tag('name', [ $p->name ], sub { push @version, $_[0]->version . '-' . $_[0]->release });
@version ? join(',', sort @version) : N("(none)");
}