Comments
Patch
@@ -63,6 +63,62 @@ do_unpack[stamp-base] = "${SS}"
do_headerfix[stamp-base] = "${SS}"
do_patch[stamp-base] = "${SS}"
+# Shared source for basichash
+def check_shared_taskdone(d, task):
+ import os.path, bb.utils
+ basedir = d.getVar('SW', True)
+ bb.utils.mkdirhier(basedir)
+ fn = os.path.join(basedir, "%s.done" % (task))
+ return os.path.exists(fn)
+
+def mark_shared_taskdone(d, task):
+ import os.path, bb.utils
+ basedir = d.getVar('SW', True)
+ bb.utils.mkdirhier(basedir)
+ fn = os.path.join(basedir, "%s.done" % (task))
+ f = open(fn, "w")
+ f.close()
+
+do_fetch[lockfiles] = "${SW}.fetch.lock"
+do_unpack[lockfiles] = "${SW}.unpack.lock"
+do_headerfix[lockfiles] = "${SW}.headerfix.lock"
+do_patch[lockfiles] = "${SW}.patch.lock"
+
+python do_fetch_prepend() {
+ if check_shared_taskdone(d, 'fetch'):
+ return
+}
+python do_fetch_append() {
+ mark_shared_taskdone(d, 'fetch')
+}
+
+python do_unpack_prepend() {
+ if check_shared_taskdone(d, 'unpack'):
+ return
+}
+python do_unpack_append() {
+ mark_shared_taskdone(d, 'unpack')
+}
+
+python do_patch_prepend() {
+ if check_shared_taskdone(d, 'patch'):
+ return
+}
+python do_patch_append() {
+ mark_shared_taskdone(d, 'patch')
+}
+
+do_headerfix_prepend() {
+ if [ -e "${SW}/headerfix.done" ]; then
+ return 0
+ fi
+}
+
+do_headerfix_append() {
+ mkdir -p "${SW}"
+ touch "${SW}/headerfix.done"
+}
+
# SW means Shared Work directory
SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
WORKDIR_task-unpack = "${SW}"
[YOCTO #1555] Adding new mechanism to allow multiple gcc related recipes sharing the same src directory when using the basichash as the signature handler. Using the same stamp file for multiple gcc related recipes to share the same src directory is no longer working when using the basichash signature. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> --- meta/recipes-devtools/gcc/gcc-common.inc | 56 ++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-)