commit: 1d2e1ee6ec7fd3d9a1e2713a19ef8a4f4db6ecf0
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 16 17:11:29 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Aug 16 17:11:29 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d2e1ee6
bin/ebuild: fix --debug to work during manifest generation
Reported-by: M. J. Everitt <m.j.everitt <AT> iee.org>
bin/ebuild | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/bin/ebuild b/bin/ebuild
index 5aa3ead95..8b58988c4 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -104,6 +104,12 @@ if not opts.ignore_default_opts:
debug = opts.debug
force = opts.force
+if debug:
+ # Ensure that all config instances have this setting,
+ # including the one that's used by portdbapi for aux_get.
+ os.environ['PORTAGE_DEBUG'] = '1'
+ portage._reset_legacy_globals()
+
# do this _after_ 'import portage' to prevent unnecessary tracing
if debug and "python-trace" in portage.features:
import portage.debug