public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arfrever Frehtes Taifersar Arahesis" <arfrever.fta@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/
Date: Fri,  7 Jun 2013 20:52:40 +0000 (UTC)	[thread overview]
Message-ID: <1370637688.c8530deda6b85dad1f7557d490f8a200e8bfa54e.arfrever@gentoo> (raw)

commit:     c8530deda6b85dad1f7557d490f8a200e8bfa54e
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Jun  7 20:41:28 2013 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Fri Jun  7 20:41:28 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c8530ded

portage.dbapi.dbapi._match_use(): Use _emerge.Package.Package._iuse.get_real_flag().

It fixes support for USE aliases in:
  best_version
  has_version
  emerge --keep-going
  emerge --resume

---
 pym/portage/dbapi/__init__.py | 40 +++++++++++++++++-----------------------
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index ab4306d..f954bad 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -204,10 +204,11 @@ class dbapi(object):
 			iuse_implicit_match = self.settings._iuse_effective_match
 		else:
 			iuse_implicit_match = self.settings._iuse_implicit_match
-		iuse = frozenset(x.lstrip('+-') for x in metadata["IUSE"].split())
+		usealiases = self.settings._use_manager.getUseAliases(self._pkg_str(cpv, metadata["repository"]))
+		iuse = Package._iuse(None, metadata["IUSE"].split(), iuse_implicit_match, usealiases, metadata["EAPI"])
 
 		for x in atom.unevaluated_atom.use.required:
-			if x not in iuse and not iuse_implicit_match(x):
+			if iuse.get_real_flag(x) is None:
 				return False
 
 		if atom.use is None:
@@ -220,27 +221,24 @@ class dbapi(object):
 			# data corruption). The enabled flags must be consistent
 			# with implicit IUSE, in order to avoid potential
 			# inconsistencies in USE dep matching (see bug #453400).
-			use = frozenset(x for x in metadata["USE"].split()
-				if x in iuse or iuse_implicit_match(x))
-			missing_enabled = frozenset(x for x in
-				atom.use.missing_enabled if not
-				(x in iuse or iuse_implicit_match(x)))
-			missing_disabled = frozenset(x for x in
-				atom.use.missing_disabled if not
-				(x in iuse or iuse_implicit_match(x)))
-
-			if atom.use.enabled:
-				if any(x in atom.use.enabled for x in missing_disabled):
+			use = frozenset(x for x in metadata["USE"].split() if iuse.get_real_flag(x) is not None)
+			missing_enabled = frozenset(x for x in atom.use.missing_enabled if iuse.get_real_flag(x) is None)
+			missing_disabled = frozenset(x for x in atom.use.missing_disabled if iuse.get_real_flag(x) is None)
+			enabled = frozenset((iuse.get_real_flag(x) or x) for x in atom.use.enabled)
+			disabled = frozenset((iuse.get_real_flag(x) or x) for x in atom.use.disabled)
+
+			if enabled:
+				if any(x in enabled for x in missing_disabled):
 					return False
-				need_enabled = atom.use.enabled.difference(use)
+				need_enabled = enabled.difference(use)
 				if need_enabled:
 					if any(x not in missing_enabled for x in need_enabled):
 						return False
 
-			if atom.use.disabled:
-				if any(x in atom.use.disabled for x in missing_enabled):
+			if disabled:
+				if any(x in disabled for x in missing_enabled):
 					return False
-				need_disabled = atom.use.disabled.intersection(use)
+				need_disabled = disabled.intersection(use)
 				if need_disabled:
 					if any(x not in missing_disabled for x in need_disabled):
 						return False
@@ -266,15 +264,11 @@ class dbapi(object):
 
 			# Check unsatisfied use-default deps
 			if atom.use.enabled:
-				missing_disabled = frozenset(x for x in
-					atom.use.missing_disabled if not
-					(x in iuse or iuse_implicit_match(x)))
+				missing_disabled = frozenset(x for x in atom.use.missing_disabled if iuse.get_real_flag(x) is None)
 				if any(x in atom.use.enabled for x in missing_disabled):
 					return False
 			if atom.use.disabled:
-				missing_enabled = frozenset(x for x in
-					atom.use.missing_enabled if not
-					(x in iuse or iuse_implicit_match(x)))
+				missing_enabled = frozenset(x for x in atom.use.missing_enabled if iuse.get_real_flag(x) is None)
 				if any(x in atom.use.disabled for x in missing_enabled):
 					return False
 


             reply	other threads:[~2013-06-07 20:52 UTC|newest]

Thread overview: 288+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 20:52 Arfrever Frehtes Taifersar Arahesis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-16  5:27 [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ Zac Medico
2018-07-15 21:40 Zac Medico
2018-07-14 23:58 Zac Medico
2018-06-26 20:24 Zac Medico
2018-04-30  6:29 Zac Medico
2018-04-29 21:29 Zac Medico
2018-04-24  6:56 Zac Medico
2018-04-23 19:53 Zac Medico
2018-04-23 18:52 Zac Medico
2018-04-17 17:18 Zac Medico
2018-04-13  1:23 Zac Medico
2018-04-11  1:47 Zac Medico
2018-04-10 22:17 Zac Medico
2018-04-10  1:33 Zac Medico
2018-03-16 21:11 Michał Górny
2018-02-28 18:41 Zac Medico
2017-11-21 19:27 Zac Medico
2017-11-21  1:34 Zac Medico
2017-11-14  3:15 Zac Medico
2017-10-15  0:59 Zac Medico
2017-08-27  9:33 Fabian Groffen
2017-02-28 22:07 Michał Górny
2017-02-28 22:07 Michał Górny
2016-11-10 20:25 Zac Medico
2016-06-19 22:17 Zac Medico
2016-06-02 15:48 Zac Medico
2016-03-05  8:21 Zac Medico
2016-01-24 10:33 Zac Medico
2015-09-24 20:30 Zac Medico
2015-05-16 19:14 Zac Medico
2015-05-09  7:33 Zac Medico
2015-05-04  5:15 Zac Medico
2015-05-02 23:11 Zac Medico
2015-04-29  4:20 Zac Medico
2015-04-06  5:07 Zac Medico
2015-04-01 19:16 Zac Medico
2015-03-04 21:37 Zac Medico
2015-03-04 21:37 Zac Medico
2015-03-04 21:37 Zac Medico
2015-02-17 18:31 Zac Medico
2014-12-17 22:13 Zac Medico
2014-12-15 16:28 Arfrever Frehtes Taifersar Arahesis
2014-12-07 23:14 Zac Medico
2014-12-07 23:14 Zac Medico
2014-12-07 23:14 Zac Medico
2014-12-07  0:58 Zac Medico
2014-11-18  3:00 Zac Medico
2014-11-02 18:22 Zac Medico
2014-09-11 23:37 Zac Medico
2014-04-04 23:01 Brian Dolbec
2014-02-24  0:53 Alexander Berntsen
2014-02-07 22:35 Chris Reffett
2014-01-19  8:16 Arfrever Frehtes Taifersar Arahesis
2013-12-05 15:38 Brian Dolbec
2013-09-17 23:32 Zac Medico
2013-08-12  3:23 Zac Medico
2013-08-04 22:09 Zac Medico
2013-07-07  3:23 Zac Medico
2013-06-08  5:48 Zac Medico
2013-06-08  3:00 Zac Medico
2013-06-08  2:49 Zac Medico
2013-06-02 22:48 Zac Medico
2013-05-17  2:06 Zac Medico
2013-05-15  7:40 Zac Medico
2013-05-07  3:49 Zac Medico
2013-05-06  8:18 Zac Medico
2013-04-12 17:23 Zac Medico
2013-04-01 17:28 Zac Medico
2013-03-16  5:39 Zac Medico
2013-03-16  5:30 Zac Medico
2013-03-16  1:46 Zac Medico
2013-01-28 21:19 Zac Medico
2013-01-24 18:29 Zac Medico
2013-01-17 14:20 Zac Medico
2013-01-10 14:06 Zac Medico
2013-01-06 20:50 Zac Medico
2013-01-03 22:42 Zac Medico
2012-12-30  9:36 Zac Medico
2012-12-28 22:45 Zac Medico
2012-12-27  3:10 Zac Medico
2012-12-24 21:12 Zac Medico
2012-12-24 21:06 Zac Medico
2012-12-24 20:21 Zac Medico
2012-12-10  8:55 Zac Medico
2012-12-10  8:39 Zac Medico
2012-11-26  3:27 Zac Medico
2012-11-15  0:03 Zac Medico
2012-10-30 23:11 Zac Medico
2012-10-25 19:49 Zac Medico
2012-10-25 15:42 Zac Medico
2012-10-25 15:33 Zac Medico
2012-10-25 15:31 Zac Medico
2012-10-25  9:35 Zac Medico
2012-10-25  9:32 Zac Medico
2012-10-25  8:23 Zac Medico
2012-10-25  6:59 Zac Medico
2012-10-18  3:32 Zac Medico
2012-10-18  0:48 Zac Medico
2012-10-09  2:02 Zac Medico
2012-10-07 22:02 Zac Medico
2012-09-26  3:47 Zac Medico
2012-09-16 21:16 Zac Medico
2012-09-16 21:01 Zac Medico
2012-08-08 20:52 Zac Medico
2012-08-08 20:34 Zac Medico
2012-08-02 20:22 Zac Medico
2012-08-02  0:57 Zac Medico
2012-07-31 23:10 Arfrever Frehtes Taifersar Arahesis
2012-07-12 20:58 Zac Medico
2012-07-05  3:28 Zac Medico
2012-07-02 22:27 Zac Medico
2012-07-02 21:41 Zac Medico
2012-07-01 20:07 Zac Medico
2012-07-01  8:11 Zac Medico
2012-06-24 21:01 Zac Medico
2012-06-24 19:16 Zac Medico
2012-06-23 20:39 Zac Medico
2012-06-23  1:14 Zac Medico
2012-06-15 23:43 Zac Medico
2012-06-12  6:41 Zac Medico
2012-05-17 20:08 Zac Medico
2012-05-14 23:56 Zac Medico
2012-05-14  0:46 Zac Medico
2012-05-14  0:29 Zac Medico
2012-05-09 22:29 Zac Medico
2012-05-05 16:54 Zac Medico
2012-04-22 20:34 Zac Medico
2012-04-18  1:48 Zac Medico
2012-03-23 17:28 Zac Medico
2012-03-18 22:40 Zac Medico
2012-02-23  5:31 Zac Medico
2012-02-23  3:07 Zac Medico
2012-02-15 22:28 Zac Medico
2012-02-15 22:17 Zac Medico
2012-02-11 18:46 Zac Medico
2012-02-09  5:17 Zac Medico
2012-02-09  5:05 Zac Medico
2012-01-27 22:02 Zac Medico
2012-01-11 16:02 Zac Medico
2011-12-22 19:43 Zac Medico
2011-12-22  0:32 Zac Medico
2011-12-22  0:29 Zac Medico
2011-12-21 23:16 Zac Medico
2011-12-21 22:58 Zac Medico
2011-12-20 20:27 Zac Medico
2011-12-10 19:41 Zac Medico
2011-12-10  7:04 Zac Medico
2011-12-01 20:34 Zac Medico
2011-11-27 21:00 Zac Medico
2011-11-26  1:54 Arfrever Frehtes Taifersar Arahesis
2011-10-30  0:00 Zac Medico
2011-10-29  5:35 Zac Medico
2011-10-29  4:17 Zac Medico
2011-10-28 18:03 Zac Medico
2011-10-25 14:52 Zac Medico
2011-10-19 21:19 Zac Medico
2011-10-17  5:21 Zac Medico
2011-10-16  5:59 Zac Medico
2011-10-15 20:29 Zac Medico
2011-10-14  0:24 Zac Medico
2011-10-05  4:27 Zac Medico
2011-10-02 20:02 Zac Medico
2011-09-27 16:46 Zac Medico
2011-09-27 14:58 Zac Medico
2011-09-24 22:24 Zac Medico
2011-09-24 22:03 Zac Medico
2011-09-24 21:44 Zac Medico
2011-09-24 21:32 Zac Medico
2011-09-24 21:18 Zac Medico
2011-09-24 20:47 Zac Medico
2011-09-24 20:15 Zac Medico
2011-09-24 19:50 Zac Medico
2011-09-24 19:27 Zac Medico
2011-09-24 19:05 Zac Medico
2011-09-24 18:29 Zac Medico
2011-09-24 18:13 Zac Medico
2011-09-23 20:50 Zac Medico
2011-09-23 20:01 Zac Medico
2011-09-23 19:53 Zac Medico
2011-09-23 18:19 Zac Medico
2011-09-23  1:48 Zac Medico
2011-09-23  0:53 Zac Medico
2011-09-07 17:36 Zac Medico
2011-09-02 15:08 Zac Medico
2011-09-01  8:43 Zac Medico
2011-09-01  6:46 Zac Medico
2011-08-30  2:09 Zac Medico
2011-08-06 11:10 Zac Medico
2011-08-04 23:09 Zac Medico
2011-08-02  8:56 Zac Medico
2011-08-01 12:32 Zac Medico
2011-07-29 20:27 Zac Medico
2011-07-29  7:22 Zac Medico
2011-07-28 11:29 Zac Medico
2011-07-27  1:51 Zac Medico
2011-07-23 18:47 Zac Medico
2011-07-12 19:50 Zac Medico
2011-07-08  6:46 Zac Medico
2011-07-01  4:02 Zac Medico
2011-06-29 11:37 Zac Medico
2011-06-17 20:57 Zac Medico
2011-06-13 22:14 Zac Medico
2011-06-11  3:41 Zac Medico
2011-06-10 17:20 Zac Medico
2011-06-10 12:21 Zac Medico
2011-06-10 12:04 Zac Medico
2011-06-06 11:52 Zac Medico
2011-06-05  9:18 Zac Medico
2011-06-05  9:01 Zac Medico
2011-06-05  8:55 Zac Medico
2011-06-05  8:14 Zac Medico
2011-06-05  7:23 Zac Medico
2011-06-05  7:10 Zac Medico
2011-06-04  2:13 Zac Medico
2011-06-03 11:20 Zac Medico
2011-06-03 10:16 Zac Medico
2011-06-03  2:38 Zac Medico
2011-05-27  2:38 Zac Medico
2011-05-27  2:15 Zac Medico
2011-05-27  0:01 Zac Medico
2011-05-26  2:34 Zac Medico
2011-05-26  1:39 Zac Medico
2011-05-26  0:57 Zac Medico
2011-05-25  5:10 Zac Medico
2011-05-25  5:02 Zac Medico
2011-05-25  4:37 Zac Medico
2011-05-25  4:08 Zac Medico
2011-05-24 10:40 Zac Medico
2011-05-21 14:23 Zac Medico
2011-05-21 13:15 Zac Medico
2011-05-18  5:38 Zac Medico
2011-05-18  5:27 Zac Medico
2011-05-16  1:26 Zac Medico
2011-05-16  0:22 Zac Medico
2011-05-15 23:20 Zac Medico
2011-05-15  9:32 Zac Medico
2011-05-15  4:32 Zac Medico
2011-05-15  2:55 Zac Medico
2011-05-15  2:44 Zac Medico
2011-05-14 23:55 Zac Medico
2011-05-14 22:56 Arfrever Frehtes Taifersar Arahesis
2011-05-14 22:14 Zac Medico
2011-05-14 21:41 Zac Medico
2011-05-14 21:25 Zac Medico
2011-05-12 19:02 Zac Medico
2011-05-12 17:51 Zac Medico
2011-05-12  7:09 Zac Medico
2011-05-12  5:35 Zac Medico
2011-05-12  1:16 Zac Medico
2011-05-10 19:53 Zac Medico
2011-05-10  5:05 Zac Medico
2011-05-10  4:47 Zac Medico
2011-05-09 20:36 Zac Medico
2011-05-09  6:25 Zac Medico
2011-05-09  4:52 Zac Medico
2011-05-08 20:46 Zac Medico
2011-05-08 20:19 Zac Medico
2011-05-08 19:35 Zac Medico
2011-05-08  7:30 Zac Medico
2011-05-08  4:53 Zac Medico
2011-05-08  4:53 Zac Medico
2011-05-03  3:02 Zac Medico
2011-03-27 22:38 Zac Medico
2011-03-27 21:26 Zac Medico
2011-03-27 20:57 Zac Medico
2011-03-27  6:09 Zac Medico
2011-03-26 23:26 Zac Medico
2011-03-26 18:01 Zac Medico
2011-03-26  8:23 Zac Medico
2011-03-26  2:43 Zac Medico
2011-03-26  2:43 Zac Medico
2011-03-25 20:53 Zac Medico
2011-03-25 10:39 Zac Medico
2011-03-25 10:13 Zac Medico
2011-03-25  9:47 Zac Medico
2011-03-25  8:25 Zac Medico
2011-03-25  8:12 Zac Medico
2011-03-16 20:58 Zac Medico
2011-03-07 17:34 Zac Medico
2011-03-02 19:49 Zac Medico
2011-03-02 18:54 Zac Medico
2011-03-01 21:23 Zac Medico
2011-03-01 21:05 Zac Medico
2011-03-01 20:43 Zac Medico
2011-03-01 20:08 Zac Medico
2011-03-01 18:07 Zac Medico
2011-02-14  4:02 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=1370637688.c8530deda6b85dad1f7557d490f8a200e8bfa54e.arfrever@gentoo \
    --to=arfrever.fta@gmail.com \
    --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