From: Phil Blundell <philb@gnu.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [Draft design][RFC] Running postinst at rootfs generation time
Date: Wed, 13 Jul 2011 11:04:44 +0100 [thread overview]
Message-ID: <1310551484.6337.240.camel@phil-desktop> (raw)
In-Reply-To: <4E1C7F36.1080501@windriver.com>
On Tue, 2011-07-12 at 12:07 -0500, Mark Hatle wrote:
> On 7/5/11 5:06 AM, Hauser, Wolfgang (external) wrote:
> > The problem with the alphabetic order of the postinst scripts we managed by renaming some of the packages to fit the needed order. An ugly solution, but in case of missing python skills, the easiest.
>
> Ya, this one bothers me slightly... and I'm not really sure how to solve it...
I guess the obvious answer is just to capture the ordering of the
postinsts at the point where opkg-native tries to run them in offline
root mode. That is, something like:
+ rm -f ${IMAGE_ROOTFS}${opkglibdir}/unconfigured
runtime_script_required=0
for i in ${IMAGE_ROOTFS}${opkglibdir}/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
runtime_script_required=1
- opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
+ pkg=`basename $i .postinst`
+ opkg-cl ${IPKG_ARGS} flag unpacked $pkg
+ echo $pkg >> ${IMAGE_ROOTFS}${opkglibdir}/unconfigured
[...]
if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
if [ $runtime_script_required -eq 0 ]; then
# All packages were successfully configured.
# update-rc.d, base-passwd are no further use, remove them now
opkg-cl ${IPKG_ARGS} --force-depends remove update-rc.d base-passwd || true
# Also delete the status files
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
fi
+ else
+ rm -f ${IMAGE_ROOTFS}${opkglibdir}/unconfigured
fi
Or, well, you get the idea.
p.
next prev parent reply other threads:[~2011-07-13 10:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 2:09 [Draft design][RFC] Running postinst at rootfs generation time Cui, Dexuan
2011-06-28 4:11 ` Mark Hatle
2011-06-28 13:15 ` Richard Purdie
2011-06-28 14:44 ` Mark Hatle
2011-06-28 16:58 ` Hauser, Wolfgang (external)
2011-07-04 0:23 ` Cui, Dexuan
2011-07-05 8:42 ` Tom Parkin
2011-07-05 10:06 ` Hauser, Wolfgang (external)
2011-07-05 10:22 ` Phil Blundell
2011-07-05 10:30 ` Hauser, Wolfgang (external)
2011-07-05 10:36 ` Phil Blundell
2011-07-12 17:07 ` Mark Hatle
2011-07-13 7:58 ` Hauser, Wolfgang (external)
2011-07-13 10:04 ` Phil Blundell [this message]
2011-06-28 13:18 ` Richard Purdie
2011-06-28 20:31 ` Saul Wold
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=1310551484.6337.240.camel@phil-desktop \
--to=philb@gnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox