* [PATCH 0/2] Fix prelink to avoid first boot script
@ 2011-06-29 1:42 Mark Hatle
2011-06-29 1:42 ` [PATCH 1/2] sstate.bbclass: Fix an issue if the config changes Mark Hatle
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mark Hatle @ 2011-06-29 1:42 UTC (permalink / raw)
To: openembedded-core
In most cases the user will have the image-prelink enabled, which will
prelink the target image at image creation time. If this is enabled
we want to avoid prelinking at first boot. We do this by setting the
script exit status to '0' if we detect we're on the host.
Also fixes a small bug found in sstate.bbclass: do_cleansstate
The following changes since commit 8a5c20417d4d6bee6dd0bcdbeb8d4f9e0696a216:
[PATCH] u-boot-mkimage: bump version to 2011.03 (2011-06-28 17:13:12 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/prelink
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/prelink
Mark Hatle (2):
sstate.bbclass: Fix an issue if the config changes
prelink_git.bb: Only block the postinst script when no image-prelink
meta/classes/sstate.bbclass | 2 ++
meta/recipes-devtools/prelink/prelink_git.bb | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] sstate.bbclass: Fix an issue if the config changes
2011-06-29 1:42 [PATCH 0/2] Fix prelink to avoid first boot script Mark Hatle
@ 2011-06-29 1:42 ` Mark Hatle
2011-06-29 1:42 ` [PATCH 2/2] prelink_git.bb: Only block the postinst script when no image-prelink Mark Hatle
2011-06-29 13:36 ` [PATCH 0/2] Fix prelink to avoid first boot script Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2011-06-29 1:42 UTC (permalink / raw)
To: openembedded-core
We need to check if we know of the task type, before we attempt
to process it. In order to reproduce the problem build with:
PACKAGE_CLASSES = "package_ipk"
Then change it to:
PACKAGE_CLASSES = "package_rpm"
Build again -- and then try bitbake -c cleansstate <recipe>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/sstate.bbclass | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 14c90ec..0daaf48 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -273,6 +273,8 @@ python sstate_cleanall() {
name = manifest.replace(manifest_pattern[:-1], "")
namemap = d.getVar('SSTATETASKNAMES', True).split()
tasks = d.getVar('SSTATETASKS', True).split()
+ if name not in namemap:
+ continue
taskname = tasks[namemap.index(name)]
shared_state = sstate_state_fromvars(d, taskname[3:])
sstate_clean(shared_state, d)
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] prelink_git.bb: Only block the postinst script when no image-prelink
2011-06-29 1:42 [PATCH 0/2] Fix prelink to avoid first boot script Mark Hatle
2011-06-29 1:42 ` [PATCH 1/2] sstate.bbclass: Fix an issue if the config changes Mark Hatle
@ 2011-06-29 1:42 ` Mark Hatle
2011-06-29 11:20 ` Phil Blundell
2011-06-29 13:36 ` [PATCH 0/2] Fix prelink to avoid first boot script Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2011-06-29 1:42 UTC (permalink / raw)
To: openembedded-core
If image-prelink is being used, the system will automatically prelink
the target image. This avoids the need to run the postinst prelink
script at first boot. However, if the user has not enabled image
prelinking -- then we do enable the script to run on first boot.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/recipes-devtools/prelink/prelink_git.bb | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index b57c145..1b34e59 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -10,7 +10,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
SRCREV = "ac461e73b17253a4da25c5aafeac7193b553156c"
PV = "1.0+git${SRCPV}"
-PR = "r3"
+PR = "r4"
#
# The cron script attempts to re-prelink the system daily -- on
@@ -58,11 +58,13 @@ do_install_append () {
install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink
}
+# If we're using mklibs-prelink, we want to skip this on the host side
+# but still do it if the package is installed on the target...
pkg_postinst_prelink() {
#!/bin/sh
if [ "x$D" != "x" ]; then
- exit 1
+ ${@base_contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)}
fi
prelink -a
--
1.7.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/2] Fix prelink to avoid first boot script
2011-06-29 1:42 [PATCH 0/2] Fix prelink to avoid first boot script Mark Hatle
2011-06-29 1:42 ` [PATCH 1/2] sstate.bbclass: Fix an issue if the config changes Mark Hatle
2011-06-29 1:42 ` [PATCH 2/2] prelink_git.bb: Only block the postinst script when no image-prelink Mark Hatle
@ 2011-06-29 13:36 ` Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-06-29 13:36 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2011-06-28 at 20:42 -0500, Mark Hatle wrote:
> In most cases the user will have the image-prelink enabled, which will
> prelink the target image at image creation time. If this is enabled
> we want to avoid prelinking at first boot. We do this by setting the
> script exit status to '0' if we detect we're on the host.
>
> Also fixes a small bug found in sstate.bbclass: do_cleansstate
>
> The following changes since commit 8a5c20417d4d6bee6dd0bcdbeb8d4f9e0696a216:
>
> [PATCH] u-boot-mkimage: bump version to 2011.03 (2011-06-28 17:13:12 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib mhatle/prelink
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/prelink
>
> Mark Hatle (2):
> sstate.bbclass: Fix an issue if the config changes
> prelink_git.bb: Only block the postinst script when no image-prelink
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-29 13:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 1:42 [PATCH 0/2] Fix prelink to avoid first boot script Mark Hatle
2011-06-29 1:42 ` [PATCH 1/2] sstate.bbclass: Fix an issue if the config changes Mark Hatle
2011-06-29 1:42 ` [PATCH 2/2] prelink_git.bb: Only block the postinst script when no image-prelink Mark Hatle
2011-06-29 11:20 ` Phil Blundell
2011-06-29 11:20 ` Phil Blundell
2011-06-29 13:36 ` [PATCH 0/2] Fix prelink to avoid first boot script Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox