All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] baremetal-image: Fix post process command rootfs_update_timestamp
@ 2021-05-19 15:59 Alejandro Hernandez Samaniego
  0 siblings, 0 replies; only message in thread
From: Alejandro Hernandez Samaniego @ 2021-05-19 15:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alejandro Enedino Hernandez Samaniego

When running:

execute_pre_post_process(d, d.getVar(ROOTFS_POSTPROCESS_COMMAND))

rootfs_update_timestamp is run, which assumes that rootfs/${sysconfdir}
is already created (usually done through the do_rootfs task on linux).

This causes the build to fail if ${sysconfdir} does not exist.

This may be overlooked if debug-tweaks is enabled since some other
commands are added, one of which creates the required path
(see postinst_enable_logging).

See [1] for more info:

[1] https://github.com/aehs29/meta-freertos/issues/4

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
---
 meta/classes/baremetal-image.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/baremetal-image.bbclass b/meta/classes/baremetal-image.bbclass
index 319b61c7cd..8708a54301 100644
--- a/meta/classes/baremetal-image.bbclass
+++ b/meta/classes/baremetal-image.bbclass
@@ -50,6 +50,10 @@ python do_rootfs(){
         if os.path.lexists(manifest_link):
             os.remove(manifest_link)
         os.symlink(os.path.basename(manifest_name), manifest_link)
+    # A lot of postprocess commands assume the existence of rootfs/etc
+    sysconfdir = d.getVar("IMAGE_ROOTFS") + d.getVar('sysconfdir')
+    bb.utils.mkdirhier(sysconfdir)
+
     execute_pre_post_process(d, d.getVar('ROOTFS_POSTPROCESS_COMMAND'))
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-19 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 15:59 [PATCH] baremetal-image: Fix post process command rootfs_update_timestamp Alejandro Hernandez Samaniego

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.