From: Alejandro Hernandez Date: Mon, 5 Dec 2016 17:00:56 +0000 (-0600) Subject: systemd-boot.bbclass: Fix SYSYTEMD_BOOT_CFG creation X-Git-Tag: uninative-1.5~852 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1;p=openembedded-core.git systemd-boot.bbclass: Fix SYSYTEMD_BOOT_CFG creation This patch makes sure the directory which will contain the systemd configuration (loader.conf) is created before the configuration file is written, fixing errors when it tried to write it to a non-existent directory Signed-off-by: Alejandro Hernandez Signed-off-by: Ross Burton --- diff --git a/meta/classes/systemd-boot.bbclass b/meta/classes/systemd-boot.bbclass index 6718783367..6a2cbc8a93 100644 --- a/meta/classes/systemd-boot.bbclass +++ b/meta/classes/systemd-boot.bbclass @@ -72,6 +72,9 @@ python build_efi_cfg() { return cfile = d.getVar('SYSTEMD_BOOT_CFG') + cdir = os.path.dirname(cfile) + if not os.path.exists(cdir): + os.makedirs(cdir) try: cfgfile = open(cfile, 'w') except OSError: