Skip to content

Commit

Permalink
adding select and skip functionality to merge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrobbins committed Jan 4, 2011
1 parent 6033c70 commit e3d1717
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions funtoo/scripts/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ def gitCommit(self,message="",push=False):

class InsertEbuilds(MergeStep):

def __init__(self,srctree,replace=False,categories=None):
def __init__(self,srctree,select="all",skip=None,replace=False,categories=None):
self.select = select
self.skip = skip
self.srctree = srctree
self.replace = replace
self.categories = categories
Expand Down Expand Up @@ -175,10 +177,17 @@ def run(self,desttree):
continue
runShell("install -d %s" % catdir)
for pkg in os.listdir(catdir):
catpkg = "%s/%s" % (cat,pkg)
pkgdir = os.path.join(catdir, pkg)
if not os.path.isdir(pkgdir):
# not a valid package dir in source overlay, so skip it
continue
if type(self.select) == types.ListType and catpkg not in self.select:
# we have a list of pkgs to merge, and this isn't on the list, so skip:
continue
if type(self.skip) == types.ListType and catpkg in self.skip:
# we have a list of pkgs to skip, and this catpkg is on the list, so skip:
continue
tpkgdir = os.path.join(desttree.root,cat)
tpkgdir = os.path.join(tpkgdir,pkg)
copy = False
Expand Down Expand Up @@ -238,9 +247,9 @@ def run(self,tree):
ProfileDepFix(),
SyncDir(funtoo_overlay.root,"licenses"),
SyncDir(funtoo_overlay.root,"eclass"),
InsertEbuilds(funtoo_overlay, replace=True),
InsertEbuilds(tarsius_overlay, replace=["sys-libs/libixp","x11-wm/wmii","dev-vcs/cvsps","net-print/foo2zjs"]),
InsertEbuilds(foo_overlay, replace=["app-shells/rssh"]),
InsertEbuilds(funtoo_overlay, select="all", skip=None, replace=True),
InsertEbuilds(tarsius_overlay, select="all", skip=None, replace=["sys-libs/libixp","x11-wm/wmii","dev-vcs/cvsps","net-print/foo2zjs"]),
InsertEbuilds(foo_overlay, select="all", skip=None, replace=["app-shells/rssh"]),
GenCache()
]

Expand Down

0 comments on commit e3d1717

Please sign in to comment.