[oe-commits] Ross Burton : guile: touch compiled modules on sstate install

git at git.openembedded.org git at git.openembedded.org
Thu Dec 13 15:22:25 UTC 2012


Module: openembedded-core.git
Branch: danny
Commit: 1e96fea6c603a500e21b9cd4626ecd19049bf04b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1e96fea6c603a500e21b9cd4626ecd19049bf04b

Author: Ross Burton <ross.burton at intel.com>
Date:   Wed Nov 28 17:28:39 2012 +0000

guile: touch compiled modules on sstate install

When guile is installed from sstate, if the compiled files get a modified time
older than the source files then guile will produce warnings like this:

;;; note: source file /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/ice-9/boot-9.scm
;;; newer than compiled /data/poky-master/tmp/sysroots/x86_64-linux/usr/lib/guile/2.0/ccache/ice-9/boot-9.go

Not staging the files and letting guile re-compile them on demand won't work:

;;; compiling /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/system/base/compile.scm
;;; it seems /data/poky-master/tmp/sysroots/x86_64-linux/usr/share/guile/2.0/system/base/compile.scm
;;; is part of the compiler; skipping auto-compilation

So, use a sstate postinst function to explicitly touch the compiled files after
the extraction to ensure that they are fresher.

[ YOCTO #3370 ]

Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/guile/guile_2.0.6.bb |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/guile/guile_2.0.6.bb b/meta/recipes-devtools/guile/guile_2.0.6.bb
index a5205d1..63ad263 100644
--- a/meta/recipes-devtools/guile/guile_2.0.6.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.6.bb
@@ -28,7 +28,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
 SRC_URI[md5sum] = "3438cd4415c0c43ca93a20e845eba7e2"
 SRC_URI[sha256sum] = "3ece055145a5020dd36b84f5fbccd4b3846a671960dd5ee55931555f03200950"
 
-PR = "r1"
+PR = "r2"
 
 inherit autotools gettext
 BBCLASSEXTEND = "native"
@@ -90,3 +90,14 @@ guile_cross_config() {
 	        install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
 	fi
 }
+
+# Guile needs the compiled files to be newer than the source, and it won't
+# auto-compile into the prefix even if it can write there, so touch them here as
+# sysroot is managed.
+SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
+guile_sstate_postinst() {
+	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+	then
+                find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch
+	fi
+}





More information about the Openembedded-commits mailing list