From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/
Date: Sun, 30 Dec 2018 02:34:08 +0000 (UTC) [thread overview]
Message-ID: <1546131586.17cb113abf2b155b7b1f2955f7eed54f335badb0.zmedico@gentoo> (raw)
commit: 17cb113abf2b155b7b1f2955f7eed54f335badb0
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 30 00:21:17 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Dec 30 00:59:46 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=17cb113a
ResolverPlayground: exclude internal wrappers from essential_binaries PATH
Ensure that essential_binaries symlinks do not refer to internal
wrapper scripts, in order to avoid infinite recursion. Use the
same ebuild-helpers pattern as the portageq wrapper script since
daeb75b345c4433218ab9e7a5319e8914092f048.
Fixes: 1b5edbb5ec70 ("_doebuild_path: do not use host PATH by default and prepend EPREFIX PATH")
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/portage/tests/resolver/ResolverPlayground.py | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py
index 3997ad26e..626a1f064 100644
--- a/lib/portage/tests/resolver/ResolverPlayground.py
+++ b/lib/portage/tests/resolver/ResolverPlayground.py
@@ -108,8 +108,21 @@ class ResolverPlayground(object):
"uniq",
"xargs",
)
- for x in essential_binaries:
- os.symlink(find_binary(x), os.path.join(eubin, x))
+ # Exclude internal wrappers from PATH lookup.
+ orig_path = os.environ['PATH']
+ included_paths = []
+ for path in orig_path.split(':'):
+ if path and not fnmatch.fnmatch(path, '*/portage/*/ebuild-helpers*'):
+ included_paths.append(path)
+ try:
+ os.environ['PATH'] = ':'.join(included_paths)
+ for x in essential_binaries:
+ path = find_binary(x)
+ if path is None:
+ raise portage.exception.CommandNotFound(x)
+ os.symlink(path, os.path.join(eubin, x))
+ finally:
+ os.environ['PATH'] = orig_path
else:
self.eprefix = normalize_path(eprefix)
next reply other threads:[~2018-12-30 2:34 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-30 2:34 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-20 19:27 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/ Zac Medico
2019-09-12 19:05 Zac Medico
2019-09-12 19:43 Zac Medico
2019-09-15 3:36 Zac Medico
2019-10-11 4:00 Zac Medico
2019-10-21 8:26 Zac Medico
2019-11-16 9:57 Zac Medico
2019-12-21 23:54 Zac Medico
2019-12-22 0:28 Zac Medico
2019-12-22 0:35 Zac Medico
2019-12-25 8:18 Zac Medico
2020-01-21 2:37 Zac Medico
2020-01-25 22:37 Zac Medico
2020-01-26 0:20 Zac Medico
2020-01-26 6:27 Zac Medico
2020-02-01 4:48 Zac Medico
2020-02-08 8:35 Zac Medico
2020-02-09 23:15 Zac Medico
2020-02-09 23:57 Zac Medico
2020-02-10 2:29 Zac Medico
2020-02-10 3:19 Zac Medico
2020-04-11 23:50 Zac Medico
2020-08-03 19:30 Zac Medico
2020-08-03 21:42 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-30 22:39 Zac Medico
2020-09-19 20:28 Zac Medico
2020-11-15 5:56 Zac Medico
2020-12-02 17:33 Zac Medico
2021-01-11 3:40 Zac Medico
2021-02-23 22:39 Zac Medico
2021-03-01 6:43 Zac Medico
2021-03-01 8:56 Zac Medico
2021-03-06 9:53 Zac Medico
2021-03-28 6:21 Zac Medico
2021-05-24 6:33 Zac Medico
2022-02-14 0:14 Zac Medico
2022-07-25 20:44 Mike Gilbert
2022-07-25 22:01 Zac Medico
2023-01-02 20:45 Mike Gilbert
2023-02-19 19:19 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2023-06-16 3:34 Sam James
2023-06-16 3:34 Sam James
2023-06-19 21:17 Sam James
2023-11-18 1:16 Zac Medico
2023-11-28 22:26 Sam James
2023-12-24 19:30 Zac Medico
2024-02-09 21:40 Zac Medico
2024-05-26 18:48 Zac Medico
2024-05-26 18:58 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=1546131586.17cb113abf2b155b7b1f2955f7eed54f335badb0.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