From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Laurentiu Palcu <laurentiu.palcu@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [RFC 2/7] image.bbclass: run postinst scripts once, at rootfs time
Date: Thu, 20 Sep 2012 13:25:02 +0100 [thread overview]
Message-ID: <1348143902.25163.46.camel@ted> (raw)
In-Reply-To: <949436f21dca1d0f73ff55f2692d8c1459657fa2.1348052899.git.laurentiu.palcu@intel.com>
On Wed, 2012-09-19 at 14:49 +0300, Laurentiu Palcu wrote:
> This patch will allow the repeating postinst scriptlets to be run
> only once, on host, at do_rootfs time. This will lower the time for
> rootfs generation and, also, instead of running some time consuming
> scriptlets at target's first boot, we will do on the host.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
> meta/classes/image.bbclass | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index ab212b3..4889260 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -155,7 +155,7 @@ inherit ${IMAGE_CLASSES}
>
> IMAGE_POSTPROCESS_COMMAND ?= ""
> MACHINE_POSTPROCESS_COMMAND ?= ""
> -ROOTFS_POSTPROCESS_COMMAND ?= ""
> +ROOTFS_POSTPROCESS_COMMAND ?= "run_intercept_scriptlets"
>
> # some default locales
> IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
> @@ -174,6 +174,21 @@ do_build[nostamp] = "1"
> # task, so that we have a single fakeroot context for the whole process.
> do_rootfs[umask] = "022"
>
> +
> +run_intercept_scriptlets () {
> + echo $D >> test.txt
> + if [ -d ${WORKDIR}/intercept_scripts ]; then
> + cd ${WORKDIR}/intercept_scripts
> + echo "Running intercept scripts:"
> + for script in *; do
> + if [ "$script" = "*" ]; then break; fi
> + echo "> Executing $script"
> + chmod +x $script
> + ./$script
> + done
> + fi
> +}
> +
> fakeroot do_rootfs () {
> #set -x
> # When use the rpm incremental image generation, don't remove the rootfs
> @@ -202,6 +217,13 @@ fakeroot do_rootfs () {
> done
> fi
>
> + if [ -d ${WORKDIR}/intercept_scripts ]; then
> + # clean-up old intercept scripts
> + rm -f ${WORKDIR}/intercept_scripts/*
> + else
> + mkdir ${WORKDIR}/intercept_scripts
> + fi
You can achieve this piece with:
do_rootfs[cleandirs] += "${WORKDIR}/intercept_scripts"
Cheers,
Richard
next prev parent reply other threads:[~2012-09-20 12:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 11:49 [RFC 0/7] Postinstall improvements Laurentiu Palcu
2012-09-19 11:49 ` [RFC 1/7] gtk+: enable gtk+-native Laurentiu Palcu
2012-09-19 11:49 ` [RFC 2/7] image.bbclass: run postinst scripts once, at rootfs time Laurentiu Palcu
2012-09-19 15:14 ` Burton, Ross
2012-09-19 15:45 ` Laurentiu Palcu
2012-09-19 15:50 ` Burton, Ross
2012-09-19 17:12 ` Laurentiu Palcu
2012-09-20 12:25 ` Richard Purdie [this message]
2012-09-19 11:49 ` [RFC 3/7] rootfs generation: export two new variables to postinst scriptlets Laurentiu Palcu
2012-09-19 11:49 ` [RFC 4/7] gtk-icon-cache: run the icon generation at rootfs time Laurentiu Palcu
2012-09-19 13:28 ` Khem Raj
2012-09-19 13:38 ` Burton, Ross
2012-09-19 15:26 ` Laurentiu Palcu
2012-09-19 11:49 ` [RFC 5/7] gdk-pixbuf: generate the pixbuf loader's cache ar " Laurentiu Palcu
2012-09-19 13:30 ` Khem Raj
2012-09-19 15:29 ` Laurentiu Palcu
2012-09-19 11:49 ` [RFC 6/7] sato-icon-theme: make use of the gtk-icon-cache postinst scriptlet Laurentiu Palcu
2012-09-19 13:36 ` Burton, Ross
2012-09-19 15:30 ` Laurentiu Palcu
2012-09-19 11:49 ` [RFC 7/7] postinst changes: bump PR to all recipes inheriting gnome and gtk-icon-cache Laurentiu Palcu
[not found] ` <CALbNGRTCyvfZFYHx6bKV8oVDJWH3X0tj1DHSJm9CkvT4xY2f7A@mail.gmail.com>
[not found] ` <5059E5C3.2080603@intel.com>
2012-09-20 15:38 ` [RFC 0/7] Postinstall improvements Andreas Müller
2012-09-20 16:12 ` Andreas Müller
2012-09-20 18:15 ` Laurentiu Palcu
2012-09-20 20:54 ` Martin Jansa
2012-09-26 7:09 ` Laurentiu Palcu
2012-09-26 7:41 ` Andreas Müller
2012-10-03 23:37 ` Andreas Müller
2012-10-04 19:16 ` Andreas Müller
2012-10-05 6:39 ` Laurentiu Palcu
2012-10-05 20:43 ` Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348143902.25163.46.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=laurentiu.palcu@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.