From 9ca2fad2e569597f460e6bcbbd96077c8b8cfce9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 8 Jan 2018 17:41:27 +0000 Subject: image: Expand PV to avoid AUTOREV parsing failures Currently, setting PV to include SRCPV for build-appliance results in: bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export ftp_proxy="http://proxy.yocto.io:5187/"; export FTP_PROXY="http://proxy.yocto.io:5187/"; export PATH="${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/python3-native:/home/pokybuild/ yocto-autobuilder/yocto-worker/buildtools/build/scripts:${TMPDIR}/ work/qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/usr/bin/x86_64-poky-linux:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot/usr/bin/crossscripts:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/usr/sbin: ${TMPDIR}/work/qemux86_64-poky-linux/build-appliance-image/ fetcheravoidrecurse-r0/recipe-sysroot-native/usr/bin:${TMPDIR}/work/ qemux86_64-poky-linux/build-appliance-image/fetcheravoidrecurse-r0/ recipe-sysroot-native/sbin:${TMPDIR}/work/qemux86_64-poky-linux/ build-appliance-image/fetcheravoidrecurse-r0/recipe-sysroot-native/bin:/home/ pokybuild/yocto-autobuilder/yocto-worker/buildtools/build/bitbake/bin:${TMPDIR} /hosttools"; export HOME="/home/pokybuild"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/poky failed with exit code 127, output: /bin/sh: 1: git: not found This is because PV is being expanded when TMPDIR is unset. Expand PV in advance to avoid this problem. Signed-off-by: Richard Purdie --- meta/classes/image.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/classes/image.bbclass') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index ec940a4b65..4531aa2a57 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -441,6 +441,8 @@ python () { # This means the task's hash can be stable rather than having hardcoded # date/time values. It will get expanded at execution time. # Similarly TMPDIR since otherwise we see QA stamp comparision problems + # Expand PV else it can trigger get_srcrev which can fail due to these variables being unset + localdata.setVar('PV', d.getVar('PV')) localdata.delVar('DATETIME') localdata.delVar('DATE') localdata.delVar('TMPDIR') -- cgit 1.2.3-korg