Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/
Date: Tue, 26 Jun 2018 20:24:28
Message-Id: 1530044185.2710f9ab525e7c726c2ffb027e242dbdf31cfe76.zmedico@gentoo
1 commit: 2710f9ab525e7c726c2ffb027e242dbdf31cfe76
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 26 20:14:09 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 26 20:16:25 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2710f9ab
7
8 binarytree._merge_pkgindex_header: deduplicate values (bug 657422)
9
10 Deduplicate values of implicit IUSE variables, in order to
11 prevent them from growing without bound, triggering "[Errno 7]
12 Argument list too long" errors as reported in bug 657422.
13
14 Fixes: cab78dba98c4 ("emerge --usepkgonly: propagate implicit IUSE and USE_EXPAND (bug 640318)")
15 Bug: https://bugs.gentoo.org/657422
16
17 pym/portage/dbapi/bintree.py | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
21 index 269a7b226..9c2d877e7 100644
22 --- a/pym/portage/dbapi/bintree.py
23 +++ b/pym/portage/dbapi/bintree.py
24 @@ -1320,7 +1320,9 @@ class binarytree(object):
25 for k, v in iter_iuse_vars(src):
26 v_before = dest.get(k)
27 if v_before is not None:
28 - v = v_before + ' ' + v
29 + merged_values = set(v_before.split())
30 + merged_values.update(v.split())
31 + v = ' '.join(sorted(merged_values))
32 dest[k] = v
33
34 if 'ARCH' not in dest and 'ARCH' in src: