summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-03-25 16:10:57 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-26 14:02:28 +0000
commit64c21baf63ebf622eecf77dd35c8be6e5e9ee68b (patch)
tree87d01dab77e7a2571a59548435c995c4ebca81ff /bitbake/lib/bb/fetch2/hg.py
parent49d6cd5000e2ff77b48b930fbceaa5938095e96d (diff)
downloadpoky-64c21baf63ebf622eecf77dd35c8be6e5e9ee68b.tar.gz
bitbake: fetch2: Unify BB_FETCH_PREMIRRORONLY
The fetch2/__init__.py checks whether "BB_FETCH_PREMIRRORONLY" == "1", but fetch2/git.py and hg.py checks whether it is None, this makes it discontinuous, and BB_FETCH_PREMIRRORONLY = "0" doens't work as expected in the later case, so unify it to the previous one. (As BB_NO_NETWORK does). And also use bb.utils.to_boolean() to make them consistent. (Bitbake rev: 85a0d22835588e9ad8ec29d88a8115227e88420c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/hg.py')
-rw-r--r--bitbake/lib/bb/fetch2/hg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 936d043112..5a2985e16c 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -99,7 +99,7 @@ class Hg(FetchMethod):
99 def try_premirror(self, ud, d): 99 def try_premirror(self, ud, d):
100 # If we don't do this, updating an existing checkout with only premirrors 100 # If we don't do this, updating an existing checkout with only premirrors
101 # is not possible 101 # is not possible
102 if d.getVar("BB_FETCH_PREMIRRORONLY") is not None: 102 if bb.utils.to_boolean(d.getVar("BB_FETCH_PREMIRRORONLY")):
103 return True 103 return True
104 if os.path.exists(ud.moddir): 104 if os.path.exists(ud.moddir):
105 return False 105 return False