diff options
author | Darren Hart <dvhart@linux.intel.com> | 2014-05-23 09:57:59 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-28 08:32:27 +0100 |
commit | 46c2aa4041a477d1ee240a42a6361ff98dd61354 (patch) | |
tree | 489a82e456544364935434544ea254e960a29035 /meta | |
parent | 594097f53da16c8485d16564b28a20abec1eaa1f (diff) | |
download | poky-46c2aa4041a477d1ee240a42a6361ff98dd61354.tar.gz |
linux-yocto-dev: Dynamic SRCREV update
The current implementation would result in the default SRCREVs being
used by the fetcher, even though the anonymous python would update them
to AUTOREV. This appears to be something to do with early parsing
bitbake black magic.
This patch ensures the default is never assigned if we are actually
building the recipe by using a function to assign it in the first place.
The USE_DEFAULT* variables are removed as they are not necessary to
allow for overriding the SRCREVs.
The anonymous python parse check is moved closer to the top of the
recipe to be a bit more logically representative of its intended
purpose.
(From OE-Core rev: a0334b0de654a41c53df54ef80625094368113f6)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto-dev.bb | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb index 5e097203e2..9b49eee876 100644 --- a/meta/recipes-kernel/linux/linux-yocto-dev.bb +++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb | |||
@@ -11,37 +11,30 @@ | |||
11 | inherit kernel | 11 | inherit kernel |
12 | require recipes-kernel/linux/linux-yocto.inc | 12 | require recipes-kernel/linux/linux-yocto.inc |
13 | 13 | ||
14 | USE_MACHINE_AUTOREV ?= "1" | ||
15 | USE_META_AUTOREV ?= "1" | ||
16 | |||
17 | # provide this .inc to set specific revisions | 14 | # provide this .inc to set specific revisions |
18 | include recipes-kernel/linux/linux-yocto-dev-revisions.inc | 15 | include recipes-kernel/linux/linux-yocto-dev-revisions.inc |
19 | 16 | ||
17 | # Skip processing of this recipe if it is not explicitly specified as the | ||
18 | # PREFERRED_PROVIDER for virtual/kernel. This avoids network access required | ||
19 | # by the use of AUTOREV SRCREVs, which are the default for this recipe. | ||
20 | python () { | ||
21 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev": | ||
22 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it") | ||
23 | } | ||
24 | |||
20 | KBRANCH = "standard/base" | 25 | KBRANCH = "standard/base" |
21 | KBRANCH_DEFAULT = "${KBRANCH}" | 26 | KBRANCH_DEFAULT = "${KBRANCH}" |
22 | KMETA = "meta" | 27 | KMETA = "meta" |
23 | 28 | ||
24 | SRC_URI = "git://git.pokylinux.org/linux-yocto-dev.git;nocheckout=1;branch=${KBRANCH},${KMETA};name=machine,meta" | 29 | SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" |
25 | 30 | ||
26 | # Set default SRCREVs. Both the machine and meta SRCREVs are statically set | 31 | # Set default SRCREVs. Both the machine and meta SRCREVs are statically set |
27 | # to the korg v3.7 tag, and hence prevent network access during parsing. If | 32 | # to the korg v3.7 tag, and hence prevent network access during parsing. If |
28 | # linux-yocto-dev is the preferred provider, they will be overridden to | 33 | # linux-yocto-dev is the preferred provider, they will be overridden to |
29 | # AUTOREV in following anonymous python routine and resolved when the | 34 | # AUTOREV in following anonymous python routine and resolved when the |
30 | # variables are finalized. | 35 | # variables are finalized. |
31 | SRCREV_machine ?= "29594404d7fe73cd80eaa4ee8c43dcc53970c60e" | 36 | SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' |
32 | SRCREV_meta ?= "29594404d7fe73cd80eaa4ee8c43dcc53970c60e" | 37 | SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}' |
33 | |||
34 | python () { | ||
35 | if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev": | ||
36 | raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it") | ||
37 | else: | ||
38 | # if the revisions have been changed from the defaults above we leave them | ||
39 | # alone. But if the defaults are left, we change to AUTOREV. | ||
40 | if d.getVar("USE_MACHINE_AUTOREV", True) == "1": | ||
41 | d.setVar("SRCREV_machine", "${AUTOREV}") | ||
42 | if d.getVar("USE_META_AUTOREV", True) == "1": | ||
43 | d.setVar("SRCREV_meta", "${AUTOREV}") | ||
44 | } | ||
45 | 38 | ||
46 | LINUX_VERSION ?= "3.14+" | 39 | LINUX_VERSION ?= "3.14+" |
47 | LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" | 40 | LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}" |