summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-07-22 10:08:15 +0000
committerAlec Warner <antarus@gentoo.org>2007-07-22 10:08:15 +0000
commite933bb90b92205a522bdc89ab6bac285efc210d2 (patch)
tree25ffaf8fec3354c037826049e64d12dc7fe2f274 /pym/portage
parent6f4ce3e8fa339a435e80798d9ce1cac4a2a0c83f (diff)
downloadportage-e933bb90b92205a522bdc89ab6bac285efc210d2.tar.gz
portage-e933bb90b92205a522bdc89ab6bac285efc210d2.tar.bz2
portage-e933bb90b92205a522bdc89ab6bac285efc210d2.zip
remove unused vars from xpak, fix bug in compose. Also fix tests for portage sets, fix misnamed variable.
svn path=/main/trunk/; revision=7355
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/sets/__init__.py5
-rw-r--r--pym/portage/xpak.py3
2 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py
index 3e1fbdb2e..0f4eca16a 100644
--- a/pym/portage/sets/__init__.py
+++ b/pym/portage/sets/__init__.py
@@ -12,6 +12,7 @@ from portage import flatten
OPERATIONS = ["merge", "unmerge"]
DEFAULT_SETS = ["world", "system", "everything", "security"] \
+["package_"+x for x in ["mask", "unmask", "use", "keywords"]]
+del x
class PackageSet(object):
# Set this to operations that are supported by your subclass. While
@@ -203,7 +204,7 @@ def make_extra_static_sets(configroot):
for myname in mysets:
if myname in DEFAULT_SETS:
continue
- rValue.add(StaticFileSet(fname, os.path.join(mydir, myname)))
+ rValue.add(StaticFileSet(myname, os.path.join(mydir, myname)))
return rValue
def make_category_sets(portdbapi, settings, only_visible=True):
@@ -224,7 +225,7 @@ if __name__ == "__main__":
for s in sys.argv[1:]:
if s.startswith("category_"):
c = s[9:]
- l.add(CategorySet("category_%s" % c, c, portdbapi, only_visible=only_visible))
+ l.add(CategorySet("category_%s" % c, c, portage.db['/']['porttree'].dbapi, only_visible=False))
elif os.path.exists(s):
l.add(StaticFileSet(os.path.basename(s), s))
elif s != "*":
diff --git a/pym/portage/xpak.py b/pym/portage/xpak.py
index 2a015571c..e24da3010 100644
--- a/pym/portage/xpak.py
+++ b/pym/portage/xpak.py
@@ -126,7 +126,6 @@ def xsplit_mem(mydat):
if mydat[-8:]!="XPAKSTOP":
return None
indexsize=decodeint(mydat[8:12])
- datasize=decodeint(mydat[12:16])
return (mydat[16:indexsize+16], mydat[indexsize+16:-8])
def getindex(infile):
@@ -251,7 +250,7 @@ class tbz2(object):
return self.unpackinfo(datadir)
def compose(self,datadir,cleanup=0):
"""Alias for recompose()."""
- return recompose(datadir,cleanup)
+ return self.recompose(datadir,cleanup)
def recompose(self,datadir,cleanup=0):
"""Creates an xpak segment from the datadir provided, truncates the tbz2
to the end of regular data if an xpak segment already exists, and adds