summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass20
1 files changed, 17 insertions, 3 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 7b24e4e285..719d871bca 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -156,7 +156,7 @@ inherit ${IMAGE_CLASSES}
156 156
157IMAGE_POSTPROCESS_COMMAND ?= "" 157IMAGE_POSTPROCESS_COMMAND ?= ""
158MACHINE_POSTPROCESS_COMMAND ?= "" 158MACHINE_POSTPROCESS_COMMAND ?= ""
159ROOTFS_POSTPROCESS_COMMAND ?= "" 159ROOTFS_POSTPROCESS_COMMAND_prepend = "run_intercept_scriptlets; "
160 160
161# some default locales 161# some default locales
162IMAGE_LINGUAS ?= "de-de fr-fr en-gb" 162IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
@@ -166,15 +166,29 @@ LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IM
166PSEUDO_PASSWD = "${IMAGE_ROOTFS}" 166PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
167 167
168do_rootfs[nostamp] = "1" 168do_rootfs[nostamp] = "1"
169do_rootfs[dirs] = "${TOPDIR}" 169do_rootfs[dirs] = "${TOPDIR} ${WORKDIR}/intercept_scripts"
170do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" 170do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
171do_rootfs[cleandirs] += "${S}" 171do_rootfs[cleandirs] += "${S} ${WORKDIR}/intercept_scripts"
172do_build[nostamp] = "1" 172do_build[nostamp] = "1"
173 173
174# Must call real_do_rootfs() from inside here, rather than as a separate 174# Must call real_do_rootfs() from inside here, rather than as a separate
175# task, so that we have a single fakeroot context for the whole process. 175# task, so that we have a single fakeroot context for the whole process.
176do_rootfs[umask] = "022" 176do_rootfs[umask] = "022"
177 177
178
179run_intercept_scriptlets () {
180 if [ -d ${WORKDIR}/intercept_scripts ]; then
181 cd ${WORKDIR}/intercept_scripts
182 echo "Running intercept scripts:"
183 for script in *; do
184 if [ "$script" = "*" ]; then break; fi
185 echo "> Executing $script"
186 chmod +x $script
187 ./$script
188 done
189 fi
190}
191
178fakeroot do_rootfs () { 192fakeroot do_rootfs () {
179 #set -x 193 #set -x
180 # When use the rpm incremental image generation, don't remove the rootfs 194 # When use the rpm incremental image generation, don't remove the rootfs