From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/portage/package/ebuild/
Date: Sat, 3 Dec 2016 20:33:17 +0000 (UTC) [thread overview]
Message-ID: <1480795421.0c06ff5f8f3e86592bbaeb38f274797505c45b2a.zmedico@gentoo> (raw)
commit: 0c06ff5f8f3e86592bbaeb38f274797505c45b2a
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 3 05:21:01 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 3 20:03:41 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0c06ff5f
bin/ebuild: fix EBUILD_FORCE_TEST / RESTRICT interaction (bug 601466)
Ensure that config adjustments are applied to all relevant
config instances, in order to prevent inconsistencies like
the one that triggered bug 601466. Move the "Forcing test"
message from config to bin/ebuild, in order to avoid
duplicate messages.
X-Gentoo-Bug: 601466
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=601466
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
bin/ebuild | 25 ++++++++++++++++++-------
pym/portage/package/ebuild/config.py | 5 -----
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/bin/ebuild b/bin/ebuild
index 1f99177..7930b41 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -53,6 +53,7 @@ from portage import _unicode_encode
from portage.const import VDB_PATH
from portage.exception import PermissionDenied, PortageKeyError, \
PortagePackageException, UnsupportedAPIException
+from portage.localization import _
import portage.util
from _emerge.Package import Package
from _emerge.RootConfig import RootConfig
@@ -244,7 +245,11 @@ if mytree == "porttree" and build_dir_phases.intersection(pargs):
ebuild_changed = \
portage.portdb._pull_valid_cache(cpv, ebuild, ebuild_portdir)[0] is None
-tmpsettings = portage.config(clone=portage.settings)
+# Make configuration adjustments to portage.portdb.doebuild_settings,
+# in order to enforce consistency for EBUILD_FORCE_TEST support
+# (see bug 601466).
+tmpsettings = portage.portdb.doebuild_settings
+
tmpsettings["PORTAGE_VERBOSE"] = "1"
tmpsettings.backup_changes("PORTAGE_VERBOSE")
@@ -265,6 +270,7 @@ if "test" in pargs:
tmpsettings["EBUILD_FORCE_TEST"] = "1"
tmpsettings.backup_changes("EBUILD_FORCE_TEST")
tmpsettings.features.add("test")
+ portage.writemsg(_("Forcing test.\n"), noiselevel=-1)
tmpsettings.features.discard("fail-clean")
@@ -272,6 +278,17 @@ if "merge" in pargs and "noauto" in tmpsettings.features:
print("Disabling noauto in features... merge disables it. (qmerge doesn't)")
tmpsettings.features.discard("noauto")
+if 'digest' in tmpsettings.features:
+ if pargs and pargs[0] not in ("digest", "manifest"):
+ pargs = ['digest'] + pargs
+ # We only need to build digests on the first pass.
+ tmpsettings.features.discard('digest')
+
+# Now that configuration adjustments are complete, create a clone of
+# tmpsettings. The current instance refers to portdb.doebuild_settings,
+# and we want to avoid the possibility of unintended side-effects.
+tmpsettings = portage.config(clone=tmpsettings)
+
try:
metadata = dict(zip(Package.metadata_keys,
portage.db[portage.settings['EROOT']][mytree].dbapi.aux_get(
@@ -315,12 +332,6 @@ def stale_env_warning():
open(os.path.join(tmpsettings['PORTAGE_BUILDDIR'],
'.ebuild_changed'), 'w').close()
-if 'digest' in tmpsettings.features:
- if pargs and pargs[0] not in ("digest", "manifest"):
- pargs = ['digest'] + pargs
- # We only need to build digests on the first pass.
- tmpsettings.features.discard('digest')
-
checked_for_stale_env = False
for arg in pargs:
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 505c7a2..4f7e5c9 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1699,11 +1699,6 @@ class config(object):
ebuild_force_test = not restrict_test and \
self.get("EBUILD_FORCE_TEST") == "1"
- if ebuild_force_test and \
- not hasattr(self, "_ebuild_force_test_msg_shown"):
- self._ebuild_force_test_msg_shown = True
- writemsg(_("Forcing test.\n"), noiselevel=-1)
-
if "test" in explicit_iuse or iuse_implicit_match("test"):
if "test" not in self.features:
use.discard("test")
next reply other threads:[~2016-12-03 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 20:33 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-16 9:53 [gentoo-commits] proj/portage:master commit in: bin/, pym/portage/package/ebuild/ Michał Górny
2017-08-26 21:16 Michał Górny
2015-03-22 19:37 Zac Medico
2014-12-02 18:32 Zac Medico
2014-11-29 18:34 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=1480795421.0c06ff5f8f3e86592bbaeb38f274797505c45b2a.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