From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-879097-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 9A9F7138206
	for <garchives@archives.gentoo.org>; Sat, 30 Apr 2016 02:24:37 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 028D321C013;
	Sat, 30 Apr 2016 02:24:34 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 77A6C21C013
	for <gentoo-commits@lists.gentoo.org>; Sat, 30 Apr 2016 02:24:33 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 22428340D58
	for <gentoo-commits@lists.gentoo.org>; Sat, 30 Apr 2016 02:24:32 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id EC5BB337
	for <gentoo-commits@lists.gentoo.org>; Sat, 30 Apr 2016 02:24:28 +0000 (UTC)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <dolsen@gentoo.org>
Message-ID: <1461982892.8e7971169c23a43696e020433a9f205abf98ee76.dolsen@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/modules/scan/metadata/, pym/repoman/modules/scan/ebuild/, ...
X-VCS-Repository: proj/portage
X-VCS-Files: pym/repoman/modules/scan/ebuild/ebuild.py pym/repoman/modules/scan/eclasses/live.py pym/repoman/modules/scan/keywords/keywords.py pym/repoman/modules/scan/metadata/ebuild_metadata.py
X-VCS-Directories: pym/repoman/modules/scan/metadata/ pym/repoman/modules/scan/ebuild/ pym/repoman/modules/scan/eclasses/ pym/repoman/modules/scan/keywords/
X-VCS-Committer: dolsen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: 8e7971169c23a43696e020433a9f205abf98ee76
X-VCS-Branch: master
Date: Sat, 30 Apr 2016 02:24:28 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 344dea45-13c3-400f-8545-7088a953dd74
X-Archives-Hash: f7bb531d3fe426a4eb09f687ff146045

commit:     8e7971169c23a43696e020433a9f205abf98ee76
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 30 02:21:32 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Apr 30 02:21:32 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8e797116

repoman: Fix logic error causing the live eclass checks to run for a non-live ebuild

The logic inverting the original live eclass checks was not working.
Restore the live_ebuild variable instead of the is_live().
Restore the original if logic and split off the actual code to another function called like the 
original code did.

 pym/repoman/modules/scan/ebuild/ebuild.py            | 10 ++--------
 pym/repoman/modules/scan/eclasses/live.py            |  8 +++++---
 pym/repoman/modules/scan/keywords/keywords.py        |  2 +-
 pym/repoman/modules/scan/metadata/ebuild_metadata.py |  2 +-
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/pym/repoman/modules/scan/ebuild/ebuild.py b/pym/repoman/modules/scan/ebuild/ebuild.py
index 0277aa9..7b31fcd 100644
--- a/pym/repoman/modules/scan/ebuild/ebuild.py
+++ b/pym/repoman/modules/scan/ebuild/ebuild.py
@@ -45,6 +45,7 @@ class Ebuild(ScanBase):
 		self.metadata = None
 		self.eapi = None
 		self.inherited = None
+		self.live_ebuild = None
 		self.keywords = None
 		self.pkgs = {}
 
@@ -109,6 +110,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.keywords = self.metadata["KEYWORDS"].split()
 		self.archs = set(kw.lstrip("~") for kw in self.keywords if not kw.startswith("-"))
 		return False
@@ -221,14 +223,6 @@ class Ebuild(ScanBase):
 		return self.continue_
 
 	@property
-	def is_live(self):
-		'''Test if the ebuild inherits a live eclass
-
-		@returns: boolean
-		'''
-		return set(LIVE_ECLASSES.intersection(self.inherited))
-
-	@property
 	def runInPkgs(self):
 		'''Package level scans'''
 		return (True, [self.check_isebuild])

diff --git a/pym/repoman/modules/scan/eclasses/live.py b/pym/repoman/modules/scan/eclasses/live.py
index 1ce33c0..0036f10 100644
--- a/pym/repoman/modules/scan/eclasses/live.py
+++ b/pym/repoman/modules/scan/eclasses/live.py
@@ -34,15 +34,17 @@ class LiveEclassChecks(ScanBase):
 		y_ebuild = kwargs.get('y_ebuild')
 		keywords = ebuild.keywords
 
-		if not ebuild.is_live and self.repo_settings.repo_config.name == "gentoo":
-			return False
+		if ebuild.live_ebuild and self.repo_settings.repo_config.name == "gentoo":
+			return self.check_live(pkg, package, ebuild, y_ebuild)
+		return False
 
+	def check_live(pkg, package, ebuild, y_ebuild):
 		is_stable = lambda kw: not kw.startswith("~") and not kw.startswith("-")
 		bad_stable_keywords = list(filter(is_stable, keywords))
 
 		if bad_stable_keywords:
 			self.qatracker.add_error(
-				"LIVEVCS.stable", "%s/%s.ebuild with stable keywords:%s " % (
+				"LIVEVCS.stable", "%s/%s.ebuild with stable keywords :%s" % (
 					package, y_ebuild, bad_stable_keywords))
 
 		good_keywords_exist = len(bad_stable_keywords) < len(keywords)

diff --git a/pym/repoman/modules/scan/keywords/keywords.py b/pym/repoman/modules/scan/keywords/keywords.py
index c3c8058..7cb2fe9 100644
--- a/pym/repoman/modules/scan/keywords/keywords.py
+++ b/pym/repoman/modules/scan/keywords/keywords.py
@@ -79,7 +79,7 @@ class KeywordChecks(ScanBase):
 		previous_keywords = self.slot_keywords.get(pkg.slot)
 		if previous_keywords is None:
 			self.slot_keywords[pkg.slot] = set()
-		elif ebuild_archs and "*" not in ebuild_archs and not ebuild.is_live:
+		elif ebuild_archs and "*" not in ebuild_archs and not ebuild.live_ebuild:
 			dropped_keywords = previous_keywords.difference(ebuild_archs)
 			if dropped_keywords:
 				self.qatracker.add_error(

diff --git a/pym/repoman/modules/scan/metadata/ebuild_metadata.py b/pym/repoman/modules/scan/metadata/ebuild_metadata.py
index bbccedf..e991a30 100644
--- a/pym/repoman/modules/scan/metadata/ebuild_metadata.py
+++ b/pym/repoman/modules/scan/metadata/ebuild_metadata.py
@@ -40,7 +40,7 @@ class EbuildMetadata(ScanBase):
 				if kwargs.get('catdir') == "virtual" and \
 					missing_var in ("HOMEPAGE", "LICENSE"):
 					continue
-				if ebuild.is_live and missing_var == "KEYWORDS":
+				if ebuild.live_ebuild and missing_var == "KEYWORDS":
 					continue
 				myqakey = missingvars[pos] + ".missing"
 				self.qatracker.add_error(myqakey, '%s/%s.ebuild'


From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-879536-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id F1770138225
	for <garchives@archives.gentoo.org>; Tue,  3 May 2016 06:11:36 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 38767E087A;
	Tue,  3 May 2016 06:11:35 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 63836E087A
	for <gentoo-commits@lists.gentoo.org>; Tue,  3 May 2016 06:11:34 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 68246340A5C
	for <gentoo-commits@lists.gentoo.org>; Tue,  3 May 2016 06:11:33 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 197AB33F
	for <gentoo-commits@lists.gentoo.org>; Tue,  3 May 2016 06:11:29 +0000 (UTC)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <dolsen@gentoo.org>
Message-ID: <1461982892.8e7971169c23a43696e020433a9f205abf98ee76.dolsen@gentoo>
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/ebuild/, pym/repoman/modules/scan/eclasses/, ...
X-VCS-Repository: proj/portage
X-VCS-Files: pym/repoman/modules/scan/ebuild/ebuild.py pym/repoman/modules/scan/eclasses/live.py pym/repoman/modules/scan/keywords/keywords.py pym/repoman/modules/scan/metadata/ebuild_metadata.py
X-VCS-Directories: pym/repoman/modules/scan/keywords/ pym/repoman/modules/scan/metadata/ pym/repoman/modules/scan/eclasses/ pym/repoman/modules/scan/ebuild/
X-VCS-Committer: dolsen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: 8e7971169c23a43696e020433a9f205abf98ee76
X-VCS-Branch: repoman
Date: Tue,  3 May 2016 06:11:29 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: ba2c8a23-b392-4de6-9065-7230d5c98c87
X-Archives-Hash: 7cf2cfae998e576e67112b51782d832d
Message-ID: <20160503061129.J7YYeZYWQT6lBmPt974Z12bs3eFYOdiG-2Qb-SkH2yU@z>

commit:     8e7971169c23a43696e020433a9f205abf98ee76
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 30 02:21:32 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Apr 30 02:21:32 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=8e797116

repoman: Fix logic error causing the live eclass checks to run for a non-live ebuild

The logic inverting the original live eclass checks was not working.
Restore the live_ebuild variable instead of the is_live().
Restore the original if logic and split off the actual code to another function called like the 
original code did.

 pym/repoman/modules/scan/ebuild/ebuild.py            | 10 ++--------
 pym/repoman/modules/scan/eclasses/live.py            |  8 +++++---
 pym/repoman/modules/scan/keywords/keywords.py        |  2 +-
 pym/repoman/modules/scan/metadata/ebuild_metadata.py |  2 +-
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/pym/repoman/modules/scan/ebuild/ebuild.py b/pym/repoman/modules/scan/ebuild/ebuild.py
index 0277aa9..7b31fcd 100644
--- a/pym/repoman/modules/scan/ebuild/ebuild.py
+++ b/pym/repoman/modules/scan/ebuild/ebuild.py
@@ -45,6 +45,7 @@ class Ebuild(ScanBase):
 		self.metadata = None
 		self.eapi = None
 		self.inherited = None
+		self.live_ebuild = None
 		self.keywords = None
 		self.pkgs = {}
 
@@ -109,6 +110,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.keywords = self.metadata["KEYWORDS"].split()
 		self.archs = set(kw.lstrip("~") for kw in self.keywords if not kw.startswith("-"))
 		return False
@@ -221,14 +223,6 @@ class Ebuild(ScanBase):
 		return self.continue_
 
 	@property
-	def is_live(self):
-		'''Test if the ebuild inherits a live eclass
-
-		@returns: boolean
-		'''
-		return set(LIVE_ECLASSES.intersection(self.inherited))
-
-	@property
 	def runInPkgs(self):
 		'''Package level scans'''
 		return (True, [self.check_isebuild])

diff --git a/pym/repoman/modules/scan/eclasses/live.py b/pym/repoman/modules/scan/eclasses/live.py
index 1ce33c0..0036f10 100644
--- a/pym/repoman/modules/scan/eclasses/live.py
+++ b/pym/repoman/modules/scan/eclasses/live.py
@@ -34,15 +34,17 @@ class LiveEclassChecks(ScanBase):
 		y_ebuild = kwargs.get('y_ebuild')
 		keywords = ebuild.keywords
 
-		if not ebuild.is_live and self.repo_settings.repo_config.name == "gentoo":
-			return False
+		if ebuild.live_ebuild and self.repo_settings.repo_config.name == "gentoo":
+			return self.check_live(pkg, package, ebuild, y_ebuild)
+		return False
 
+	def check_live(pkg, package, ebuild, y_ebuild):
 		is_stable = lambda kw: not kw.startswith("~") and not kw.startswith("-")
 		bad_stable_keywords = list(filter(is_stable, keywords))
 
 		if bad_stable_keywords:
 			self.qatracker.add_error(
-				"LIVEVCS.stable", "%s/%s.ebuild with stable keywords:%s " % (
+				"LIVEVCS.stable", "%s/%s.ebuild with stable keywords :%s" % (
 					package, y_ebuild, bad_stable_keywords))
 
 		good_keywords_exist = len(bad_stable_keywords) < len(keywords)

diff --git a/pym/repoman/modules/scan/keywords/keywords.py b/pym/repoman/modules/scan/keywords/keywords.py
index c3c8058..7cb2fe9 100644
--- a/pym/repoman/modules/scan/keywords/keywords.py
+++ b/pym/repoman/modules/scan/keywords/keywords.py
@@ -79,7 +79,7 @@ class KeywordChecks(ScanBase):
 		previous_keywords = self.slot_keywords.get(pkg.slot)
 		if previous_keywords is None:
 			self.slot_keywords[pkg.slot] = set()
-		elif ebuild_archs and "*" not in ebuild_archs and not ebuild.is_live:
+		elif ebuild_archs and "*" not in ebuild_archs and not ebuild.live_ebuild:
 			dropped_keywords = previous_keywords.difference(ebuild_archs)
 			if dropped_keywords:
 				self.qatracker.add_error(

diff --git a/pym/repoman/modules/scan/metadata/ebuild_metadata.py b/pym/repoman/modules/scan/metadata/ebuild_metadata.py
index bbccedf..e991a30 100644
--- a/pym/repoman/modules/scan/metadata/ebuild_metadata.py
+++ b/pym/repoman/modules/scan/metadata/ebuild_metadata.py
@@ -40,7 +40,7 @@ class EbuildMetadata(ScanBase):
 				if kwargs.get('catdir') == "virtual" and \
 					missing_var in ("HOMEPAGE", "LICENSE"):
 					continue
-				if ebuild.is_live and missing_var == "KEYWORDS":
+				if ebuild.live_ebuild and missing_var == "KEYWORDS":
 					continue
 				myqakey = missingvars[pos] + ".missing"
 				self.qatracker.add_error(myqakey, '%s/%s.ebuild'