From 2b2dbf76126650750cb8a6778b837af6fe4c8b21 Mon Sep 17 00:00:00 2001 From: Yu Ke Date: Mon, 27 Dec 2010 16:20:34 +0800 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index b9cca9168..751e51412 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) -- cgit v1.2.3