public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] Support PROPERTIES="live".
@ 2019-07-26  8:51 Ulrich Müller
  2019-07-26  9:28 ` [gentoo-portage-dev] [PATCH] Drop removed git and tla from list of live eclasses Ulrich Müller
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ulrich Müller @ 2019-07-26  8:51 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 4243 bytes --]

Bug: https://bugs.gentoo.org/233589
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 cnf/sets/portage.conf                             |  8 +++++++-
 lib/_emerge/EbuildExecuter.py                     |  4 ++--
 lib/portage/_sets/__init__.py                     | 12 +++++++++---
 repoman/lib/repoman/modules/scan/ebuild/ebuild.py |  3 +--
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index ac282d911..ed4c6d9a7 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -55,9 +55,15 @@ world-candidate = True
 [preserved-rebuild]
 class = portage.sets.libs.PreservedLibraryConsumerSet
 
-# Installed ebuilds that inherit from known live eclasses.
+# Installed ebuilds with "live" property.
 [live-rebuild]
 class = portage.sets.dbapi.VariableSet
+variable = PROPERTIES
+includes = live
+
+# Installed ebuilds that inherit from known live eclasses.
+[deprecated-live-rebuild]
+class = portage.sets.dbapi.VariableSet
 variable = INHERITED
 includes = bzr cvs darcs git git-2 git-r3 golang-vcs mercurial subversion tla
 
diff --git a/lib/_emerge/EbuildExecuter.py b/lib/_emerge/EbuildExecuter.py
index d387b42be..ca9859437 100644
--- a/lib/_emerge/EbuildExecuter.py
+++ b/lib/_emerge/EbuildExecuter.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from _emerge.EbuildPhase import EbuildPhase
@@ -49,7 +49,7 @@ class EbuildExecuter(CompositeTask):
 			phase="unpack", scheduler=self.scheduler,
 			settings=self.settings)
 
-		if self._live_eclasses.intersection(self.pkg.inherited):
+		if "live" in self.settings.get("PROPERTIES", "").split():
 			# Serialize $DISTDIR access for live ebuilds since
 			# otherwise they can interfere with eachother.
 
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py
index 2c9bf9715..7b81c55e2 100644
--- a/lib/portage/_sets/__init__.py
+++ b/lib/portage/_sets/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 2007-2014 Gentoo Foundation
+# Copyright 2007-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import print_function
@@ -121,8 +121,14 @@ class SetConfig(object):
 		parser.remove_section("live-rebuild")
 		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", " ".join(sorted(portage.const.LIVE_ECLASSES)))
+		parser.set("live-rebuild", "variable", "PROPERTIES")
+		parser.set("live-rebuild", "includes", "live")
+
+		parser.remove_section("deprecated-live-rebuild")
+		parser.add_section("deprecated-live-rebuild")
+		parser.set("deprecated-live-rebuild", "class", "portage.sets.dbapi.VariableSet")
+		parser.set("deprecated-live-rebuild", "variable", "INHERITED")
+		parser.set("deprecated-live-rebuild", "includes", " ".join(sorted(portage.const.LIVE_ECLASSES)))
 
 		parser.remove_section("module-rebuild")
 		parser.add_section("module-rebuild")
diff --git a/repoman/lib/repoman/modules/scan/ebuild/ebuild.py b/repoman/lib/repoman/modules/scan/ebuild/ebuild.py
index d2715bc6e..70011e387 100644
--- a/repoman/lib/repoman/modules/scan/ebuild/ebuild.py
+++ b/repoman/lib/repoman/modules/scan/ebuild/ebuild.py
@@ -12,7 +12,6 @@ from repoman.modules.scan.scanbase import ScanBase
 # import our initialized portage instance
 from repoman._portage import portage
 from portage import os
-from portage.const import LIVE_ECLASSES
 from portage.exception import InvalidPackageName
 
 pv_toolong_re = re.compile(r'[0-9]{19,}')
@@ -110,7 +109,7 @@ class Ebuild(ScanBase):
 		self.metadata = self.pkg._metadata
 		self.eapi = self.metadata["EAPI"]
 		self.inherited = self.pkg.inherited
-		self.live_ebuild = LIVE_ECLASSES.intersection(self.inherited)
+		self.live_ebuild = "live" in self.metadata["PROPERTIES"].split()
 		self.keywords = self.metadata["KEYWORDS"].split()
 		self.archs = set(kw.lstrip("~") for kw in self.keywords if not kw.startswith("-"))
 		return False
-- 
2.22.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-07-29 23:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-26  8:51 [gentoo-portage-dev] [PATCH] Support PROPERTIES="live" Ulrich Müller
2019-07-26  9:28 ` [gentoo-portage-dev] [PATCH] Drop removed git and tla from list of live eclasses Ulrich Müller
2019-07-26 20:23   ` Zac Medico
2019-07-26 20:23 ` [gentoo-portage-dev] [PATCH] Support PROPERTIES="live" Zac Medico
2019-07-26 22:08   ` Ulrich Mueller
2019-07-26 22:45 ` Michał Górny
2019-07-29  0:21   ` Zac Medico
2019-07-29  4:31     ` Michał Górny
2019-07-29 12:11       ` Ulrich Mueller
2019-07-29 19:26       ` Zac Medico
2019-07-29 12:39   ` Ulrich Mueller
2019-07-29 19:10     ` Zac Medico
2019-07-29 22:28       ` [gentoo-portage-dev] [PATCH v2] doebuild.py: Override network-sandbox in unpack only for live ebuilds (was: Re: [PATCH] Support PROPERTIES="live") Ulrich Mueller
2019-07-29 23:20         ` [gentoo-portage-dev] " Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox