diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 20 |
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 | ||
157 | IMAGE_POSTPROCESS_COMMAND ?= "" | 157 | IMAGE_POSTPROCESS_COMMAND ?= "" |
158 | MACHINE_POSTPROCESS_COMMAND ?= "" | 158 | MACHINE_POSTPROCESS_COMMAND ?= "" |
159 | ROOTFS_POSTPROCESS_COMMAND ?= "" | 159 | ROOTFS_POSTPROCESS_COMMAND_prepend = "run_intercept_scriptlets; " |
160 | 160 | ||
161 | # some default locales | 161 | # some default locales |
162 | IMAGE_LINGUAS ?= "de-de fr-fr en-gb" | 162 | IMAGE_LINGUAS ?= "de-de fr-fr en-gb" |
@@ -166,15 +166,29 @@ LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IM | |||
166 | PSEUDO_PASSWD = "${IMAGE_ROOTFS}" | 166 | PSEUDO_PASSWD = "${IMAGE_ROOTFS}" |
167 | 167 | ||
168 | do_rootfs[nostamp] = "1" | 168 | do_rootfs[nostamp] = "1" |
169 | do_rootfs[dirs] = "${TOPDIR}" | 169 | do_rootfs[dirs] = "${TOPDIR} ${WORKDIR}/intercept_scripts" |
170 | do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" | 170 | do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock" |
171 | do_rootfs[cleandirs] += "${S}" | 171 | do_rootfs[cleandirs] += "${S} ${WORKDIR}/intercept_scripts" |
172 | do_build[nostamp] = "1" | 172 | do_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. |
176 | do_rootfs[umask] = "022" | 176 | do_rootfs[umask] = "022" |
177 | 177 | ||
178 | |||
179 | run_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 | |||
178 | fakeroot do_rootfs () { | 192 | fakeroot 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 |