aboutsummaryrefslogtreecommitdiffstats
path: root/URPM
diff options
context:
space:
mode:
Diffstat (limited to 'URPM')
-rw-r--r--URPM/Resolve.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index e270909..3a582fc 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -104,6 +104,18 @@ sub strict_arch_check {
1;
}
+#- side-effects: none
+sub is_package_installed {
+ my ($db, $pkg) = @_;
+
+ my $found;
+ $db->traverse_tag('name', [ $pkg->name ], sub {
+ my ($p) = @_;
+ $found ||= $p->fullname eq $pkg->fullname;
+ });
+ $found;
+}
+
sub _is_selected_or_installed {
my ($urpm, $db, $name) = @_;