1 |
Bug: https://bugs.gentoo.org/233589 |
2 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
3 |
--- |
4 |
cnf/sets/portage.conf | 8 +++++++- |
5 |
lib/_emerge/EbuildExecuter.py | 4 ++-- |
6 |
lib/portage/_sets/__init__.py | 12 +++++++++--- |
7 |
repoman/lib/repoman/modules/scan/ebuild/ebuild.py | 3 +-- |
8 |
4 files changed, 19 insertions(+), 8 deletions(-) |
9 |
|
10 |
diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf |
11 |
index ac282d911..ed4c6d9a7 100644 |
12 |
--- a/cnf/sets/portage.conf |
13 |
+++ b/cnf/sets/portage.conf |
14 |
@@ -55,9 +55,15 @@ world-candidate = True |
15 |
[preserved-rebuild] |
16 |
class = portage.sets.libs.PreservedLibraryConsumerSet |
17 |
|
18 |
-# Installed ebuilds that inherit from known live eclasses. |
19 |
+# Installed ebuilds with "live" property. |
20 |
[live-rebuild] |
21 |
class = portage.sets.dbapi.VariableSet |
22 |
+variable = PROPERTIES |
23 |
+includes = live |
24 |
+ |
25 |
+# Installed ebuilds that inherit from known live eclasses. |
26 |
+[deprecated-live-rebuild] |
27 |
+class = portage.sets.dbapi.VariableSet |
28 |
variable = INHERITED |
29 |
includes = bzr cvs darcs git git-2 git-r3 golang-vcs mercurial subversion tla |
30 |
|
31 |
diff --git a/lib/_emerge/EbuildExecuter.py b/lib/_emerge/EbuildExecuter.py |
32 |
index d387b42be..ca9859437 100644 |
33 |
--- a/lib/_emerge/EbuildExecuter.py |
34 |
+++ b/lib/_emerge/EbuildExecuter.py |
35 |
@@ -1,4 +1,4 @@ |
36 |
-# Copyright 1999-2018 Gentoo Foundation |
37 |
+# Copyright 1999-2019 Gentoo Authors |
38 |
# Distributed under the terms of the GNU General Public License v2 |
39 |
|
40 |
from _emerge.EbuildPhase import EbuildPhase |
41 |
@@ -49,7 +49,7 @@ class EbuildExecuter(CompositeTask): |
42 |
phase="unpack", scheduler=self.scheduler, |
43 |
settings=self.settings) |
44 |
|
45 |
- if self._live_eclasses.intersection(self.pkg.inherited): |
46 |
+ if "live" in self.settings.get("PROPERTIES", "").split(): |
47 |
# Serialize $DISTDIR access for live ebuilds since |
48 |
# otherwise they can interfere with eachother. |
49 |
|
50 |
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py |
51 |
index 2c9bf9715..7b81c55e2 100644 |
52 |
--- a/lib/portage/_sets/__init__.py |
53 |
+++ b/lib/portage/_sets/__init__.py |
54 |
@@ -1,4 +1,4 @@ |
55 |
-# Copyright 2007-2014 Gentoo Foundation |
56 |
+# Copyright 2007-2019 Gentoo Authors |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
|
59 |
from __future__ import print_function |
60 |
@@ -121,8 +121,14 @@ class SetConfig(object): |
61 |
parser.remove_section("live-rebuild") |
62 |
parser.add_section("live-rebuild") |
63 |
parser.set("live-rebuild", "class", "portage.sets.dbapi.VariableSet") |
64 |
- parser.set("live-rebuild", "variable", "INHERITED") |
65 |
- parser.set("live-rebuild", "includes", " ".join(sorted(portage.const.LIVE_ECLASSES))) |
66 |
+ parser.set("live-rebuild", "variable", "PROPERTIES") |
67 |
+ parser.set("live-rebuild", "includes", "live") |
68 |
+ |
69 |
+ parser.remove_section("deprecated-live-rebuild") |
70 |
+ parser.add_section("deprecated-live-rebuild") |
71 |
+ parser.set("deprecated-live-rebuild", "class", "portage.sets.dbapi.VariableSet") |
72 |
+ parser.set("deprecated-live-rebuild", "variable", "INHERITED") |
73 |
+ parser.set("deprecated-live-rebuild", "includes", " ".join(sorted(portage.const.LIVE_ECLASSES))) |
74 |
|
75 |
parser.remove_section("module-rebuild") |
76 |
parser.add_section("module-rebuild") |
77 |
diff --git a/repoman/lib/repoman/modules/scan/ebuild/ebuild.py b/repoman/lib/repoman/modules/scan/ebuild/ebuild.py |
78 |
index d2715bc6e..70011e387 100644 |
79 |
--- a/repoman/lib/repoman/modules/scan/ebuild/ebuild.py |
80 |
+++ b/repoman/lib/repoman/modules/scan/ebuild/ebuild.py |
81 |
@@ -12,7 +12,6 @@ from repoman.modules.scan.scanbase import ScanBase |
82 |
# import our initialized portage instance |
83 |
from repoman._portage import portage |
84 |
from portage import os |
85 |
-from portage.const import LIVE_ECLASSES |
86 |
from portage.exception import InvalidPackageName |
87 |
|
88 |
pv_toolong_re = re.compile(r'[0-9]{19,}') |
89 |
@@ -110,7 +109,7 @@ class Ebuild(ScanBase): |
90 |
self.metadata = self.pkg._metadata |
91 |
self.eapi = self.metadata["EAPI"] |
92 |
self.inherited = self.pkg.inherited |
93 |
- self.live_ebuild = LIVE_ECLASSES.intersection(self.inherited) |
94 |
+ self.live_ebuild = "live" in self.metadata["PROPERTIES"].split() |
95 |
self.keywords = self.metadata["KEYWORDS"].split() |
96 |
self.archs = set(kw.lstrip("~") for kw in self.keywords if not kw.startswith("-")) |
97 |
return False |
98 |
-- |
99 |
2.22.0 |