apk3: new script_exec_dir (lib/apk/exec) broken with initdb
When bootstrapping a new system with --initdb
, since 62bc43d2 one has to pre-create at least the lib/apk
(usr/lib/apk
in my usrmerged case) in order for scripts not to fail. This is because despite that the code actually attempts to create lib/apk/exec
, this does not exist yet (because apk
defers creation of its state directories until later, to accommodate usrmerged systems).
It prints out a confusing error message:
(59/122) Installing util-linux (2.37.2-r0)
Executing util-linux-2.37.2-r0.pre-install
ERROR: il-linux-2.37.2-r0.pre-install: failed to execute: No such file or directory
This hints at some kind of truncation, but that is not the case; it's simply that the old fixed offset of 15 was forgotten in the error log part (this should be fixed too).
As for the solution, I am not entirely sure. It is not possible to recursively create it at this point, because it would break usrmerge-layout systems. Perhaps some heuristics for these kind of bootstrap cases?