From 25ce074611a6c7ac2b80f0e525d3ab91e822ed93 Mon Sep 17 00:00:00 2001 From: Sebastian Luther Date: Fri, 29 Nov 2013 21:33:31 +0100 Subject: [PATCH] portage.const: move list of live eclasses here --- bin/repoman | 11 +---------- pym/_emerge/EbuildExecuter.py | 11 +---------- pym/portage/_sets/__init__.py | 2 +- pym/portage/const.py | 12 ++++++++++++ 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/bin/repoman b/bin/repoman index 63558fa42..d1542e96b 100755 --- a/bin/repoman +++ b/bin/repoman @@ -424,16 +424,7 @@ valid_restrict = frozenset(["binchecks", "bindist", "fetch", "installsources", "mirror", "preserve-libs", "primaryuri", "splitdebug", "strip", "test", "userpriv"]) -live_eclasses = frozenset([ - "bzr", - "cvs", - "darcs", - "git", - "git-2", - "mercurial", - "subversion", - "tla", -]) +live_eclasses = portage.const.LIVE_ECLASSES suspect_rdepend = frozenset([ "app-arch/cabextract", diff --git a/pym/_emerge/EbuildExecuter.py b/pym/_emerge/EbuildExecuter.py index cfbc90d0f..5587d4eb0 100644 --- a/pym/_emerge/EbuildExecuter.py +++ b/pym/_emerge/EbuildExecuter.py @@ -16,16 +16,7 @@ class EbuildExecuter(CompositeTask): _phases = ("prepare", "configure", "compile", "test", "install") - _live_eclasses = frozenset([ - "bzr", - "cvs", - "darcs", - "git", - "git-2", - "mercurial", - "subversion", - "tla", - ]) + _live_eclasses = portage.const.LIVE_ECLASSES def _start(self): pkg = self.pkg diff --git a/pym/portage/_sets/__init__.py b/pym/portage/_sets/__init__.py index a545dba58..75d1df7bf 100644 --- a/pym/portage/_sets/__init__.py +++ b/pym/portage/_sets/__init__.py @@ -140,7 +140,7 @@ class SetConfig(object): parser.add_section("live-rebuild") parser.set("live-rebuild", "class", "portage.sets.dbapi.VariableSet") parser.set("live-rebuild", "variable", "INHERITED") - parser.set("live-rebuild", "includes", "bzr cvs darcs git git-2 mercurial subversion tla") + parser.set("live-rebuild", "includes", " ".join(sorted(portage.const.LIVE_ECLASSES))) parser.remove_section("module-rebuild") parser.add_section("module-rebuild") diff --git a/pym/portage/const.py b/pym/portage/const.py index b2e970eb7..185867ab0 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -174,6 +174,18 @@ if "PORTAGE_OVERRIDE_EPREFIX" in os.environ: VCS_DIRS = ("CVS", "RCS", "SCCS", ".bzr", ".git", ".hg", ".svn") +# List of known live eclasses. Keep it in sync with cnf/sets/portage.conf +LIVE_ECLASSES = frozenset([ + "bzr", + "cvs", + "darcs", + "git", + "git-2", + "mercurial", + "subversion", + "tla", +]) + SUPPORTED_BINPKG_FORMATS = ("tar", "rpm") # Time formats used in various places like metadata.chk. -- 2.26.2