[meta-freescale] [PATCH v2] fsl-kernel-localversion: Add preconfigure dependency on do_unpack

Mats Karrman mats.dev.list at gmail.com
Wed Apr 26 15:23:18 PDT 2017


Even if 'externalsrc' is used, SRC_URI may specify a 'defconfig'.
However as the use of 'externalsrc' will do away with the do_patch
task, do_preconfigure is in risk of being run before the defconfig
is copied to the build directory. This patch adds a second dependency
on 'do_unpack' that makes sure this does not happen.

Signed-off-by: Mats Karrman <mats.dev.list at gmail.com>
---
 classes/fsl-kernel-localversion.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal-4.9"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "rabbit"
DISTRO            = "poky"
DISTRO_VERSION    = "2.3"
TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard cortexa9"
TARGET_FPU        = "hard"
meta              
meta-poky         = "master:7a0e795373653886452a7a2992ced10080711c26"
meta-oe           
meta-networking   
meta-python       = "master:ba89d451fba299f00f3dff902cc6456106525fc9"
meta-freescale    = "master:f12671110e0d442fc1655957f6e10291f743e7d1"
meta-freescale-3rdparty = "master:ebccc38c30f13f80f7bc5822bc094512a22b0670"
meta-local        = "master:23f801c2223dca2869133b04855e69e252c9ca23"

Typical error message:
ERROR: linux-rabbit-4.10-r0 do_preconfigure: Function failed: do_preconfigure (log file is located at /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/temp/log.do_preconfigure.5546)
ERROR: Logfile of failure stored in: /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/temp/log.do_preconfigure.5546
Log data follows:
| DEBUG: Executing shell function do_preconfigure
| /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/temp/run.do_preconfigure.5546: line 116: /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/defconfig: No such file or directory
| WARNING: /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/temp/run.do_preconfigure.5546:1 exit 1 from 'sed -e "${CONF_SED_SCRIPT}" < '/home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/defconfig' >> '/home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/linux-rabbit-4.10//.config''
| ERROR: Function failed: do_preconfigure (log file is located at /home/mats/projects/cubox/oe/build/tmp/work/rabbit-poky-linux-gnueabi/linux-rabbit/4.10-r0/temp/log.do_preconfigure.5546)
ERROR: Task (/home/mats/projects/cubox/oe/meta-local/recipes-kernel/linux/linux-rabbit_4.10.bb:do_preconfigure) failed with exit code '1'

Reproducible 100% on my i7 machine. Starting build again without any changes
makes build pass since defconfig has already been copied.

Same issue found and same fix applies on kergoth.

---

diff --git a/classes/fsl-kernel-localversion.bbclass b/classes/fsl-kernel-localversion.bbclass
index 48e5403..c0306a0 100644
--- a/classes/fsl-kernel-localversion.bbclass
+++ b/classes/fsl-kernel-localversion.bbclass
@@ -38,4 +38,4 @@ do_preconfigure() {
 		printf "%s%s" +g $head > ${S}/.scmversion
 	fi
 }
-addtask preconfigure before do_configure after do_patch
+addtask preconfigure before do_configure after do_unpack do_patch
-- 
2.1.4



More information about the meta-freescale mailing list