diff options
author | Zac Medico <zmedico@gentoo.org> | 2018-06-26 13:14:09 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-06-26 13:16:25 -0700 |
commit | 2710f9ab525e7c726c2ffb027e242dbdf31cfe76 (patch) | |
tree | d08a2d4d77173b881dc65f07bd2ebc7e63d512ba /pym/portage/dbapi/bintree.py | |
parent | SpawnProcess._unregister: cancel PipeLogger (bug 658806) (diff) | |
download | portage-2710f9ab525e7c726c2ffb027e242dbdf31cfe76.tar.gz portage-2710f9ab525e7c726c2ffb027e242dbdf31cfe76.tar.bz2 portage-2710f9ab525e7c726c2ffb027e242dbdf31cfe76.zip |
binarytree._merge_pkgindex_header: deduplicate values (bug 657422)
Deduplicate values of implicit IUSE variables, in order to
prevent them from growing without bound, triggering "[Errno 7]
Argument list too long" errors as reported in bug 657422.
Fixes: cab78dba98c4 ("emerge --usepkgonly: propagate implicit IUSE and USE_EXPAND (bug 640318)")
Bug: https://bugs.gentoo.org/657422
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r-- | pym/portage/dbapi/bintree.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 269a7b226..9c2d877e7 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1320,7 +1320,9 @@ class binarytree(object): for k, v in iter_iuse_vars(src): v_before = dest.get(k) if v_before is not None: - v = v_before + ' ' + v + merged_values = set(v_before.split()) + merged_values.update(v.split()) + v = ' '.join(sorted(merged_values)) dest[k] = v if 'ARCH' not in dest and 'ARCH' in src: |