[oe-commits] [bitbake] 02/02: fetch2: Unify BB_FETCH_PREMIRRORONLY
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 21 23:34:13 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 1cc5cc8841625dc86466eceb5dcca80bd65f4724
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Wed Mar 20 14:40:51 2019 +0800
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).
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/fetch2/git.py | 2 +-
lib/bb/fetch2/hg.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 1a8ebe3..e021f33 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -318,7 +318,7 @@ class Git(FetchMethod):
def try_premirror(self, ud, d):
# If we don't do this, updating an existing checkout with only premirrors
# is not possible
- if d.getVar("BB_FETCH_PREMIRRORONLY") is not None:
+ if d.getVar("BB_FETCH_PREMIRRORONLY") == "1":
return True
if os.path.exists(ud.clonedir):
return False
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 936d043..5a3db92 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -99,7 +99,7 @@ class Hg(FetchMethod):
def try_premirror(self, ud, d):
# If we don't do this, updating an existing checkout with only premirrors
# is not possible
- if d.getVar("BB_FETCH_PREMIRRORONLY") is not None:
+ if d.getVar("BB_FETCH_PREMIRRORONLY") == "1":
return True
if os.path.exists(ud.moddir):
return False
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list