summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2006-12-24 06:10:58 +0000
committerAlec Warner <antarus@gentoo.org>2006-12-24 06:10:58 +0000
commit0b748f45716ee96e473fe28b4b0dadfa9552538f (patch)
tree3dc415948741fc8597a874cbcbbc9b229600eb2c
parentb53a4d474ad87041ce5b38f7a321d80008d523cb (diff)
downloadportage-0b748f45716ee96e473fe28b4b0dadfa9552538f.tar.gz
portage-0b748f45716ee96e473fe28b4b0dadfa9552538f.tar.bz2
portage-0b748f45716ee96e473fe28b4b0dadfa9552538f.zip
More code cleanup, packagetree appears to be completely unused, so lets remove it in favor of inheriting from object
svn path=/main/trunk/; revision=5370
-rw-r--r--pym/portage.py39
1 files changed, 2 insertions, 37 deletions
diff --git a/pym/portage.py b/pym/portage.py
index dc40ac03e..1632af70b 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -4350,41 +4350,6 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
rValue.append(kmask+" keyword")
return rValue
-class packagetree:
- def __init__(self,virtual,clone=None):
- if clone:
- self.tree=clone.tree.copy()
- self.populated=clone.populated
- self.virtual=clone.virtual
- self.dbapi=None
- else:
- self.tree={}
- self.populated=0
- self.virtual=virtual
- self.dbapi=None
-
- def resolve_key(self,mykey):
- return key_expand(mykey, mydb=self.dbapi, settings=self.settings)
-
- def dep_nomatch(self,mypkgdep):
- mykey=dep_getkey(mypkgdep)
- nolist=self.dbapi.cp_list(mykey)
- mymatch=self.dbapi.match(mypkgdep)
- if not mymatch:
- return nolist
- for x in mymatch:
- if x in nolist:
- nolist.remove(x)
- return nolist
-
- def depcheck(self,mycheck,use="yes",myusesplit=None):
- return dep_check(mycheck,self.dbapi,use=use,myuse=myusesplit)
-
- def populate(self):
- "populates the tree with values"
- populated=1
- pass
-
class portagetree:
def __init__(self, root="/", virtual=None, clone=None, settings=None):
@@ -5056,7 +5021,7 @@ class vardbapi(dbapi):
write_atomic(cpath, str(counter))
return counter
-class vartree(packagetree):
+class vartree(object):
"this tree will scan a var/db/pkg database located at root (passed to init)"
def __init__(self, root="/", virtual=None, clone=None, categories=None,
settings=None):
@@ -5854,7 +5819,7 @@ class portdbapi(dbapi):
newlist.append(mycpv)
return newlist
-class binarytree(packagetree):
+class binarytree(object):
"this tree scans for a list of all packages available in PKGDIR"
def __init__(self, root, pkgdir, virtual=None, settings=None, clone=None):
if clone: