public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/
Date: Wed, 28 Mar 2018 05:50:36 +0000 (UTC)	[thread overview]
Message-ID: <1522216144.a9cf08d97beffe90599d29c0d8e39235bc134047.zmedico@gentoo> (raw)

commit:     a9cf08d97beffe90599d29c0d8e39235bc134047
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 26 22:48:03 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar 28 05:49:04 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a9cf08d9

eapi: use eapi_allows_package_provided via  _get_eapi_attrs

 pym/portage/eapi.py                  | 2 ++
 pym/portage/package/ebuild/config.py | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index d91edcce4..cdbbf07fb 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -124,6 +124,7 @@ def eapi_path_variables_end_with_trailing_slash(eapi):
 			"5", "5-progress", "6")
 
 _eapi_attrs = collections.namedtuple('_eapi_attrs',
+	'allows_package_provided '
 	'bdepend dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
 	'exports_PORTDIR exports_ECLASSDIR '
 	'feature_flag_test feature_flag_targetroot '
@@ -152,6 +153,7 @@ def _get_eapi_attrs(eapi):
 		eapi = None
 
 	eapi_attrs = _eapi_attrs(
+		allows_package_provided=(eapi is None or eapi_allows_package_provided(eapi)),
 		bdepend = (eapi is not None and eapi_has_bdepend(eapi)),
 		dots_in_PN = (eapi is None or eapi_allows_dots_in_PN(eapi)),
 		dots_in_use_flags = (eapi is None or eapi_allows_dots_in_use_flags(eapi)),

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index ef9ec3e88..a32892e94 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -39,8 +39,7 @@ from portage.dbapi import dbapi
 from portage.dbapi.porttree import portdbapi
 from portage.dep import Atom, isvalidatom, match_from_list, use_reduce, _repo_separator, _slot_separator
 from portage.eapi import (eapi_exports_AA, eapi_exports_merge_type,
-	eapi_supports_prefix, eapi_exports_replace_vars, _get_eapi_attrs,
-	eapi_allows_package_provided)
+	eapi_supports_prefix, eapi_exports_replace_vars, _get_eapi_attrs)
 from portage.env.loaders import KeyValuePairFileLoader
 from portage.exception import InvalidDependString, IsADirectory, \
 		PortageException
@@ -805,7 +804,7 @@ class config(object):
 			for x in profiles_complex:
 				provpath = os.path.join(x.location, "package.provided")
 				if os.path.exists(provpath):
-					if x.eapi is None or eapi_allows_package_provided(x.eapi):
+					if _get_eapi_attrs(x.eapi).allows_package_provided:
 						pkgprovidedlines.append(grabfile(provpath,
 							recursive=x.portage1_directories))
 					else:


             reply	other threads:[~2018-03-28  5:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  5:50 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-28  5:50 [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/ Zac Medico
2015-04-06  5:13 Zac Medico
2014-11-15  5:19 Zac Medico
2014-09-11 23:45 Brian Dolbec
2014-02-05 18:13 Arfrever Frehtes Taifersar Arahesis
2012-09-20  3:14 Zac Medico
2012-07-12 19:49 Zac Medico
2011-09-12 21:27 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522216144.a9cf08d97beffe90599d29c0d8e39235bc134047.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox