summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2016-12-05 11:00:56 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-16 18:05:14 +0000
commit928a93d516756126ee863614c7cd6559957cfa7b (patch)
tree01cb8fcd8168b68e1d292815ae2060d7ebca8e2c
parent1cae998af9b45015c1c9701cb662b78e5cafe6ba (diff)
downloadpoky-928a93d516756126ee863614c7cd6559957cfa7b.tar.gz
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 (From OE-Core rev: f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/systemd-boot.bbclass3
1 files changed, 3 insertions, 0 deletions
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() {
72 return 72 return
73 73
74 cfile = d.getVar('SYSTEMD_BOOT_CFG') 74 cfile = d.getVar('SYSTEMD_BOOT_CFG')
75 cdir = os.path.dirname(cfile)
76 if not os.path.exists(cdir):
77 os.makedirs(cdir)
75 try: 78 try:
76 cfgfile = open(cfile, 'w') 79 cfgfile = open(cfile, 'w')
77 except OSError: 80 except OSError: