public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/modules/scan/ebuild/, lib/portage/_sets/, cnf/sets/, ...
@ 2019-07-27 14:14 Ulrich Müller
  0 siblings, 0 replies; only message in thread
From: Ulrich Müller @ 2019-07-27 14:14 UTC (permalink / raw
  To: gentoo-commits

commit:     e75e46958b6b032890ed27d10239e07eced63087
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 26 08:51:08 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 23:00:22 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e75e4695

Support PROPERTIES="live".

Bug: https://bugs.gentoo.org/233589
Signed-off-by: Ulrich Müller <ulm <AT> 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-27 14:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-27 14:14 [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/modules/scan/ebuild/, lib/portage/_sets/, cnf/sets/, Ulrich Müller

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