Re: Gatesgarth-24.0.4 image-live fails

Guillaume Champagne <champagne.guillaume.c@...>

Le mar. 25 mai 2021 à 08:19, Ferry Toth <fntoth@...> a écrit :

Adding Richard and Guillaume.

it seems seems sets ROOTFS as empty:

so do_bootimg won't depend on ${PN}:do_image:${LIVE_ROOTFS_TYPE}. That
dependency would, I think, create the folder you mentioned.

Maybe the patch wrongly assumes that if ROOTFS is empty, we shouldn't
add a dependency on "do_image.${LIVE_ROOTFS_TYPE}" at all since It
looks like still depends on
${PN}:do_image.${LIVE_ROOTFS_TYPE} even though ROOTFS is empty. I
haven't looked too much into why edison-image works this way.

Op 24-05-2021 om 14:39 schreef Ferry Toth:
Wow, that got messed up, let me retry.

Op 24-05-2021 om 14:19 schreef Ferry Toth:
Accidentally I refreshed poky and rebuilt. The image-live
(do_bootimg) fails when building hddimg with the following:
ERROR: edison-image-1.0-r0 do_bootimg: Error executing a python
function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this
exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
*** 0002:do_bootimg(d)
lineno: 258, function: do_bootimg
0254: if d.getVar("PCBIOS") == "1":
0255:'build_syslinux_cfg', d)
0256: if d.getVar("EFI") == "1":
0257:'build_efi_cfg', d)
*** 0258:'build_hddimg', d)
0259:'build_iso', d)
0260:'create_symlinks', d)
0262:do_bootimg[subimages] = "hddimg iso"
lineno: 256, function: exec_func
0252: with bb.utils.fileslocked(lockfiles):
0253: if ispython:
0254: exec_func_python(func, d, runfile, cwd=adir)
0255: else:
*** 0256: exec_func_shell(func, d, runfile, cwd=adir)
0258: try:
0259: curcwd = os.getcwd()
0260: except:
lineno: 503, function: exec_func_shell
0499: with open(fifopath, 'r+b', buffering=0) as fifo:
0500: try:
0501: bb.debug(2, "Executing shell function %s" % func)
0502: with open(os.devnull, 'r+') as stdin, logfile:
*** 0503:, shell=False,
stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0504: except bb.process.ExecutionError as exe:
0505: # Find the backtrace that the shell trap generated
0506: backtrace_marker_regex = re.compile(r"WARNING:
Backtrace \(BB generated script\)")
0507: stdout_lines = (exe.stdout or "").split("\n")
lineno: 184, function: run
0180: if not stderr is None:
0181: stderr = stderr.decode("utf-8")
0183: if pipe.returncode != 0:
*** 0184: raise ExecutionError(cmd, pipe.returncode, stdout,
0185: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of
failed with exit code 1:
mkdosfs: unable to create
mkfs.fat 4.1 (2017-01-24)
WARNING: exit code 1 from a shell command.

The reason is that the directory deploy-edison-image-image-complete
doesn't exist at the time mkdosfs want to write. However after
completing the remainder of image live the directory does exists.
Consequently, running bitbake a second time image-live succeeds.

I've tried various thing including expressly creating the directory
before mkdosfs, but nothing worked. It seems I don't understand how
it is supposed to work in the first place.

However, I managed to trace back the issue to this commit 91e4a1c1
"image-live.bbclass: optional depends when ROOTFS empty".

Reverting this resolves the issue.

Any idea what could be wrong?

Join { to automatically receive all group messages.