summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2013-02-05 02:31:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-05 15:22:45 +0000
commitee1f126ad5cb2c6af66815e55720257a1efc5a49 (patch)
tree2fb512a8e1f4397c85d51010af093b2c79121f17 /bitbake/lib/bb/fetch2
parent97b7e4f46e2116e9cbaa02efa7d37321fd32b368 (diff)
downloadpoky-ee1f126ad5cb2c6af66815e55720257a1efc5a49.tar.gz
bitbake: bitbake: fetch2: Print the complete SRCREV variable name when INVALID
If a particular SRCREV (say for a particular branch) is missing, the fetcher will currently just report an obtuse error about the "SRCREV" being invalid. If there is more information is to be had (say from name, i.e. branch, and pn) then display that as well. The new error looks something like this: ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://otcgit.jf.intel.com/dvhart/linux-yocto-minnow-3.4.git;protocol=git;nocheckout=1;branch=standard/minnow,meta,emgd-1.14;name=machine,meta,emgd'. Please set SRCREV_emgd_pn-linux-yocto to a valid value Note the variable listed as invalid is "SRCREV_emgd_pn-linux-yocto", making it explicit what is wrong. (Bitbake rev: 63774f5b4edb999300bddd891233f6050f4af877) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: bitbake-devel@lists.openembedded.org Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 47463561e3..cba45d0a4e 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -650,11 +650,14 @@ def srcrev_internal_helper(ud, d, name):
650 if not rev: 650 if not rev:
651 rev = d.getVar("SRCREV_%s" % name, True) 651 rev = d.getVar("SRCREV_%s" % name, True)
652 if not rev: 652 if not rev:
653 rev = d.getVar("SRCREV_pn-%s" % pn, True) 653 rev = d.getVar("SRCREV_pn-%s" % pn, True)
654 if not rev: 654 if not rev:
655 rev = d.getVar("SRCREV", True) 655 rev = d.getVar("SRCREV", True)
656 if rev == "INVALID": 656 if rev == "INVALID":
657 raise FetchError("Please set SRCREV to a valid value", ud.url) 657 var = "SRCREV_pn-%s" % pn
658 if name != '':
659 var = "SRCREV_%s_pn-%s" % (name, pn)
660 raise FetchError("Please set %s to a valid value" % var, ud.url)
658 if rev == "AUTOINC": 661 if rev == "AUTOINC":
659 rev = ud.method.latest_revision(ud.url, ud, d, name) 662 rev = ud.method.latest_revision(ud.url, ud, d, name)
660 663