commit: b7c510f76d83ef70738b03a925ffb4a36797750d
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 18:45:54 2019 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 20 19:12:58 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b7c510f7
Fix ACCEPT_LICENSE="-*" to behave as intended (bug 686406)
Fix prune_incremental to preserve the last -*, since otherwise an
empty value would trigger fallback to a default value. This ensures
that ACCEPT_LICENSE="-*" behaves as intended.
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/portage/package/ebuild/_config/helper.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/portage/package/ebuild/_config/helper.py
b/lib/portage/package/ebuild/_config/helper.py
index ee0c090a0..03eba2cc4 100644
--- a/lib/portage/package/ebuild/_config/helper.py
+++ b/lib/portage/package/ebuild/_config/helper.py
@@ -57,7 +57,9 @@ def prune_incremental(split):
break
elif x == '-*':
if i == 0:
- split = []
+ # Preserve the last -*, since otherwise an
empty value
+ # would trigger fallback to a default value.
+ split = ['-*']
else:
split = split[-i:]
break