Gentoo Archives: gentoo-portage-dev

From: SebastianLuther@×××.de
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH 1/2] Add list of live eclasses to portage.const
Date: Fri, 29 Nov 2013 20:33:49
Message-Id: 1385757212-19365-1-git-send-email-SebastianLuther@gmx.de
1 From: Sebastian Luther <SebastianLuther@×××.de>
2
3 ---
4 bin/repoman | 11 +----------
5 pym/_emerge/EbuildExecuter.py | 11 +----------
6 pym/portage/_sets/__init__.py | 2 +-
7 pym/portage/const.py | 12 ++++++++++++
8 4 files changed, 15 insertions(+), 21 deletions(-)
9
10 diff --git a/bin/repoman b/bin/repoman
11 index 1a02050..872b6e1 100755
12 --- a/bin/repoman
13 +++ b/bin/repoman
14 @@ -424,16 +424,7 @@ valid_restrict = frozenset(["binchecks", "bindist",
15 "fetch", "installsources", "mirror", "preserve-libs",
16 "primaryuri", "splitdebug", "strip", "test", "userpriv"])
17
18 -live_eclasses = frozenset([
19 - "bzr",
20 - "cvs",
21 - "darcs",
22 - "git",
23 - "git-2",
24 - "mercurial",
25 - "subversion",
26 - "tla",
27 -])
28 +live_eclasses = portage.const.LIVE_ECLASSES
29
30 suspect_rdepend = frozenset([
31 "app-arch/cabextract",
32 diff --git a/pym/_emerge/EbuildExecuter.py b/pym/_emerge/EbuildExecuter.py
33 index cfbc90d..5587d4e 100644
34 --- a/pym/_emerge/EbuildExecuter.py
35 +++ b/pym/_emerge/EbuildExecuter.py
36 @@ -16,16 +16,7 @@ class EbuildExecuter(CompositeTask):
37
38 _phases = ("prepare", "configure", "compile", "test", "install")
39
40 - _live_eclasses = frozenset([
41 - "bzr",
42 - "cvs",
43 - "darcs",
44 - "git",
45 - "git-2",
46 - "mercurial",
47 - "subversion",
48 - "tla",
49 - ])
50 + _live_eclasses = portage.const.LIVE_ECLASSES
51
52 def _start(self):
53 pkg = self.pkg
54 diff --git a/pym/portage/_sets/__init__.py b/pym/portage/_sets/__init__.py
55 index a545dba..75d1df7 100644
56 --- a/pym/portage/_sets/__init__.py
57 +++ b/pym/portage/_sets/__init__.py
58 @@ -140,7 +140,7 @@ class SetConfig(object):
59 parser.add_section("live-rebuild")
60 parser.set("live-rebuild", "class", "portage.sets.dbapi.VariableSet")
61 parser.set("live-rebuild", "variable", "INHERITED")
62 - parser.set("live-rebuild", "includes", "bzr cvs darcs git git-2 mercurial subversion tla")
63 + parser.set("live-rebuild", "includes", " ".join(sorted(portage.const.LIVE_ECLASSES)))
64
65 parser.remove_section("module-rebuild")
66 parser.add_section("module-rebuild")
67 diff --git a/pym/portage/const.py b/pym/portage/const.py
68 index 214ede4..04b5a57 100644
69 --- a/pym/portage/const.py
70 +++ b/pym/portage/const.py
71 @@ -174,6 +174,18 @@ if "PORTAGE_OVERRIDE_EPREFIX" in os.environ:
72
73 VCS_DIRS = ("CVS", "RCS", "SCCS", ".bzr", ".git", ".hg", ".svn")
74
75 +# List of known live eclasses. Keep it in sync with cnf/sets/protage.conf
76 +LIVE_ECLASSES = frozenset([
77 + "bzr",
78 + "cvs",
79 + "darcs",
80 + "git",
81 + "git-2",
82 + "mercurial",
83 + "subversion",
84 + "tla",
85 +])
86 +
87 SUPPORTED_BINPKG_FORMATS = ("tar", "rpm")
88 # ===========================================================================
89 # END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANTS -- END OF CONSTANT
90 --
91 1.8.1.5

Replies