summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2016-11-15 10:03:17 +0100
committerEnrico Jorns <ejo@pengutronix.de>2016-12-13 08:10:27 +0100
commitb04da554bf77cc214c9da5fcf723e0a91887e2af (patch)
treec99a1adbddcdf7adc62780fd3bba71044805e860
parent59df8047f466fa32d34e572806b65954d7f989e1 (diff)
downloadmeta-ptx-b04da554bf77cc214c9da5fcf723e0a91887e2af.tar.gz
meta-ptx-b04da554bf77cc214c9da5fcf723e0a91887e2af.tar.xz
classes/bundle: Always set hook file to executable
The hook skript file in the bundle must be executable to allow running hooks. This should be assured when generating the bundle. Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
-rw-r--r--classes/bundle.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/bundle.bbclass b/classes/bundle.bbclass
index 773719d..63be7c7 100644
--- a/classes/bundle.bbclass
+++ b/classes/bundle.bbclass
@@ -154,11 +154,16 @@ python do_fetch() {
do_unpack_append() {
import shutil
+ import os
+ import stat
hooksflags = d.getVarFlags('RAUC_BUNDLE_HOOKS')
if hooksflags and 'file' in hooksflags:
hf = hooksflags.get('file')
- shutil.copy(d.expand("${WORKDIR}/%s" % hf), d.expand("${S}/bundle/%s" % hf))
+ dsthook = d.expand("${S}/bundle/%s" % hf)
+ shutil.copy(d.expand("${WORKDIR}/%s" % hf), dsthook)
+ st = os.stat(dsthook)
+ os.chmod(dsthook, st.st_mode | stat.S_IEXEC)
}
DEPLOY_DIR_BUNDLE ?= "${DEPLOY_DIR_IMAGE}/bundles"