summaryrefslogtreecommitdiff
path: root/geneticone/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'geneticone/package.py')
-rw-r--r--geneticone/package.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/geneticone/package.py b/geneticone/package.py
index 6ec2299..4e18392 100644
--- a/geneticone/package.py
+++ b/geneticone/package.py
@@ -1,5 +1,16 @@
#!/usr/bin/python
+#
+# File: geneticone/package.py
+# This file is part of the Genetic/One-Project, a graphical portage-frontend.
+#
+# Copyright (C) 2006 Necoro d.M.
+# This is free software. You may redistribute copies of it under the terms of
+# the GNU General Public License version 2.
+# There is NO WARRANTY, to the extent permitted by law.
+#
+# Written by Necoro d.M. <necoro@necoro.net>
+
from geneticone import *
import gentoolkit
@@ -10,6 +21,8 @@ class Package (gentoolkit.Package):
"""This is just a subclass of the Package-class of gentoolkit."""
def __init__ (self, cpv):
+ if isinstance(cpv, gentoolkit.Package):
+ cpv = cpv.get_cpv()
gentoolkit.Package.__init__(self, cpv)
def get_mask_status(self):
@@ -154,6 +167,13 @@ class Package (gentoolkit.Package):
return True
return False
+ def matches (self, criterion):
+ """This checks, whether this package matches a specific verisioning criterion - e.g.: "<=net-im/foobar-1.2"."""
+ if portage.match_from_list(criterion, [self.get_cpv()]) == []:
+ return False
+ else:
+ return True
+
def _parse_deps(self,deps,curuse=[],level=0):
"""Modified method "_parse_deps" of gentoolkit.Package.
Do NOT ignore blocks."""
rtions'>+153 2007-02-05cgit v0.2v0.2Lars Hjemli1-1/+1 2007-02-05Add support for prefix and gitsrc arguments to 'make'Lars Hjemli2-15/+37 2007-02-04Update cgitrc templateLars Hjemli1-21/+32 2007-02-04Add support for lightweight tagsLars Hjemli2-19/+37 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli5-55/+120 2007-02-04Do not die if tag has no messageLars Hjemli1-2/+2 2007-02-03Fix search for non-virtual urlsLars Hjemli1-0/+6 2007-01-28Update README with install/config informationLars Hjemli1-24/+28