From: Stefan Metzmacher Date: Fri, 20 Aug 2021 14:25:02 +0000 (+0200) Subject: wafsamba: let reduce_objects() not remove duplicates of BUILTINS even if there are... X-Git-Tag: tdb-1.4.6~518 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38ef29bc219afcd608a1c87f8aae99cebe79b665;p=thirdparty%2Fsamba.git wafsamba: let reduce_objects() not remove duplicates of BUILTINS even if there are more than one BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index cb8acfae34e..8d76e2e434e 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -718,8 +718,12 @@ def reduce_objects(bld, tgt_list): dup = dup.difference(rely_on[t.sname]) if dup: # Do not remove duplicates of BUILTINS - d = next(iter(dup)) - if BUILTIN_LIBRARY(bld, d): + for d in iter(dup.copy()): + if BUILTIN_LIBRARY(bld, d): + debug('deps: BUILTIN_LIBRARY SKIP: removing dups from %s of type %s: %s also in %s %s', + t.sname, t.samba_type, d, t2.samba_type, l) + dup.remove(d) + if len(dup) == 0: continue debug('deps: removing dups from %s of type %s: %s also in %s %s',