From e32a6d4103c56a5c5055711697d7796c905f3dae Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Sat, 4 Jan 2020 09:35:07 +0100 Subject: [PATCH] javaw: fix buglet overwrites working variable while adding dependencies variable x is used in the outer loop and gets corrupted by inner enumeration in case of non-jar dependency to reproduce: use the demos/java and run waf build twice: the first time will work (since no class files around) while the second will not since will by bad luck pick a class file in the inner loop --- waflib/Tools/javaw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waflib/Tools/javaw.py b/waflib/Tools/javaw.py index ceb08c28..b7f5dd1f 100644 --- a/waflib/Tools/javaw.py +++ b/waflib/Tools/javaw.py @@ -251,7 +251,7 @@ def use_javac_files(self): base_node = tg.path.get_bld() self.use_lst.append(base_node.abspath()) - self.javac_task.dep_nodes.extend([x for x in base_node.ant_glob(JAR_RE, remove=False, quiet=True)]) + self.javac_task.dep_nodes.extend([dx for dx in base_node.ant_glob(JAR_RE, remove=False, quiet=True)]) for tsk in tg.tasks: self.javac_task.set_run_after(tsk)