mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
libc-package.bbclass: Use with to manage filehandle in do_spit_gconvs
Tweak the write loop slightly to avoid dict lookups that can easily be done in the for loop. (From OE-Core rev: 35c65b7336c52c19810e3e9e87a36a8636ac4120) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4bc072c7fb
commit
e6deec21d6
@@ -346,14 +346,13 @@ python package_do_split_gconvs () {
|
||||
|
||||
if use_bin == "compile":
|
||||
makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
|
||||
m = open(makefile, "w")
|
||||
m.write("all: %s\n\n" % " ".join(commands.keys()))
|
||||
total = len(commands)
|
||||
for i, cmd in enumerate(commands):
|
||||
m.write(cmd + ":\n")
|
||||
m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
|
||||
m.write("\t" + commands[cmd] + "\n\n")
|
||||
m.close()
|
||||
with open(makefile, "w") as m:
|
||||
m.write("all: %s\n\n" % " ".join(commands.keys()))
|
||||
total = len(commands)
|
||||
for i, (maketarget, makerecipe) in enumerate(commands.items()):
|
||||
m.write(maketarget + ":\n")
|
||||
m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
|
||||
m.write("\t" + makerecipe + "\n\n")
|
||||
d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile)))
|
||||
d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)")
|
||||
bb.note("Executing binary locale generation makefile")
|
||||
|
||||
Reference in New Issue
Block a user