summaryrefslogtreecommitdiffstats
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
parent1589a1172f9432aed1cc9ce006f68cddf3073774 (diff)
downloadpoky-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>
-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):
359 return local 359 return local
360 360
361def get_autorev(d): 361def get_autorev(d):
362 # only not cache src rev in autorev case
363 if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
364 bb.data.setVar('__BB_DONT_CACHE', '1', d)
362 return "AUTOINC" 365 return "AUTOINC"
363 366
364def get_srcrev(d): 367def get_srcrev(d):
@@ -385,9 +388,6 @@ def get_srcrev(d):
385 logger.error("SRCREV was used yet no valid SCM was found in SRC_URI") 388 logger.error("SRCREV was used yet no valid SCM was found in SRC_URI")
386 raise ParameterError 389 raise ParameterError
387 390
388 if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
389 bb.data.setVar('__BB_DONT_CACHE', '1', d)
390
391 if len(scms) == 1: 391 if len(scms) == 1:
392 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) 392 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
393 393