aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2010-12-27 16:20:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 20:37:37 +0000
commit2b2dbf76126650750cb8a6778b837af6fe4c8b21 (patch)
tree3471a545e3c017761ecefd8212a198a8172db527 /bitbake
parent1589a1172f9432aed1cc9ce006f68cddf3073774 (diff)
downloadopenembedded-core-contrib-2b2dbf76126650750cb8a6778b837af6fe4c8b21.tar.gz
Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"
we should cache SRCREV whenever possible, the only exception is when SREREV is auto rev. so change the logic to only set __BB_DONT_CACHE at SRCREV = "${AUTOREV}" case Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index b9cca91684..751e514121 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -359,6 +359,9 @@ def localpaths(d):
return local
def get_autorev(d):
+ # only not cache src rev in autorev case
+ if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
+ bb.data.setVar('__BB_DONT_CACHE', '1', d)
return "AUTOINC"
def get_srcrev(d):
@@ -385,9 +388,6 @@ def get_srcrev(d):
logger.error("SRCREV was used yet no valid SCM was found in SRC_URI")
raise ParameterError
- if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
- bb.data.setVar('__BB_DONT_CACHE', '1', d)
-
if len(scms) == 1:
return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)