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/dbapi/, ...
Date: Mon, 11 Feb 2013 06:35:37 +0000 (UTC) [thread overview]
Message-ID: <1360564394.ce06761841f181d12c004a56ac945a14bb5d1758.zmedico@gentoo> (raw)
commit: ce06761841f181d12c004a56ac945a14bb5d1758
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 11 06:30:13 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 11 06:33:14 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ce067618
repoman: fix use.stable, bug #456342
Make child package inherit stable status from the parent package.
This is required in order for USE deps of unstable packages to be
resolved correctly, since otherwise use.stable.{mask,force} settings
of dependencies may conflict (see bug #456342).
---
bin/repoman | 8 ++++++++
pym/portage/dbapi/__init__.py | 6 ++++--
pym/portage/package/ebuild/_config/UseManager.py | 12 +++++++-----
pym/portage/package/ebuild/config.py | 9 +++++----
4 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/bin/repoman b/bin/repoman
index 3532bab..c1bb357 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2178,6 +2178,14 @@ for x in effective_scanlist:
# just in case, prevent config.reset() from nuking these.
dep_settings.backup_changes("ACCEPT_KEYWORDS")
+ # This attribute is used in dbapi._match_use() to apply
+ # use.stable.{mask,force} settings based on the stable
+ # status of the parent package. This is required in order
+ # for USE deps of unstable packages to be resolved correctly,
+ # since otherwise use.stable.{mask,force} settings of
+ # dependencies may conflict (see bug #456342).
+ dep_settings._parent_stable = dep_settings._isStable(pkg)
+
if not baddepsyntax:
ismasked = not ebuild_archs or \
pkg.cpv not in portdb.xmatch("match-visible", pkg.cp)
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index 79d1e7a..ab4306d 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -253,11 +253,13 @@ class dbapi(object):
pkg = _pkg_str(cpv, metadata=metadata, settings=self.settings)
else:
pkg = cpv
- usemask = self.settings._getUseMask(pkg)
+ usemask = self.settings._getUseMask(pkg,
+ stable=self.settings._parent_stable)
if any(x in usemask for x in atom.use.enabled):
return False
- useforce = self.settings._getUseForce(pkg)
+ useforce = self.settings._getUseForce(pkg,
+ stable=self.settings._parent_stable)
if any(x in useforce and x not in usemask
for x in atom.use.disabled):
return False
diff --git a/pym/portage/package/ebuild/_config/UseManager.py b/pym/portage/package/ebuild/_config/UseManager.py
index 743160c..8e7aaa2 100644
--- a/pym/portage/package/ebuild/_config/UseManager.py
+++ b/pym/portage/package/ebuild/_config/UseManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = (
@@ -291,7 +291,7 @@ class UseManager(object):
# stable check against the correct profile here.
return self._is_stable(pkg)
- def getUseMask(self, pkg=None):
+ def getUseMask(self, pkg=None, stable=None):
if pkg is None:
return frozenset(stack_lists(
self._usemask_list, incremental=True))
@@ -304,7 +304,8 @@ class UseManager(object):
pkg = _pkg_str(remove_slot(pkg), slot=slot, repo=repo)
cp = pkg.cp
- stable = self._isStable(pkg)
+ if stable is None:
+ stable = self._isStable(pkg)
usemask = []
@@ -351,7 +352,7 @@ class UseManager(object):
return frozenset(stack_lists(usemask, incremental=True))
- def getUseForce(self, pkg=None):
+ def getUseForce(self, pkg=None, stable=None):
if pkg is None:
return frozenset(stack_lists(
self._useforce_list, incremental=True))
@@ -363,7 +364,8 @@ class UseManager(object):
pkg = _pkg_str(remove_slot(pkg), slot=slot, repo=repo)
cp = pkg.cp
- stable = self._isStable(pkg)
+ if stable is None:
+ stable = self._isStable(pkg)
useforce = []
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index a40cdd7..0090e4e 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -221,6 +221,7 @@ class config(object):
self._accept_properties = None
self._features_overrides = []
self._make_defaults = None
+ self._parent_stable = None
# _unknown_features records unknown features that
# have triggered warning messages, and ensures that
@@ -1734,11 +1735,11 @@ class config(object):
return iuse_implicit
- def _getUseMask(self, pkg):
- return self._use_manager.getUseMask(pkg)
+ def _getUseMask(self, pkg, stable=None):
+ return self._use_manager.getUseMask(pkg, stable=stable)
- def _getUseForce(self, pkg):
- return self._use_manager.getUseForce(pkg)
+ def _getUseForce(self, pkg, stable=None):
+ return self._use_manager.getUseForce(pkg, stable=stable)
def _getMaskAtom(self, cpv, metadata):
"""
next reply other threads:[~2013-02-11 6:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 6:35 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-11-16 4:44 [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/dbapi/, Arfrever Frehtes Taifersar Arahesis
2012-08-25 4:14 Zac Medico
2012-05-13 1:07 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=1360564394.ce06761841f181d12c004a56ac945a14bb5d1758.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