summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-18 15:14:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-19 22:43:48 +0100
commit659ef95c9b8aced3c4ded81c48bcc0fbde4d429f (patch)
treec63666710636bf12d25ef5a491f5d1abbcca4f96 /lib/bb/fetch2
parent5ecd6a671c088f270d5f49093f8da83278fc0aa9 (diff)
downloadbitbake-contrib-659ef95c9b8aced3c4ded81c48bcc0fbde4d429f.tar.gz
bitbake: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/__init__.py2
-rw-r--r--lib/bb/fetch2/clearcase.py4
-rw-r--r--lib/bb/fetch2/perforce.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 958469db6..cc772df49 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1003,7 +1003,7 @@ def trusted_network(d, url):
if d.getVar('BB_NO_NETWORK', True) == "1":
return True
- pkgname = d.expand(d.getVar('PN'))
+ pkgname = d.expand(d.getVar('PN', False))
trusted_hosts = d.getVarFlag('BB_ALLOWED_NETWORKS', pkgname)
if not trusted_hosts:
diff --git a/lib/bb/fetch2/clearcase.py b/lib/bb/fetch2/clearcase.py
index bfca2f7bc..ba83e7cb6 100644
--- a/lib/bb/fetch2/clearcase.py
+++ b/lib/bb/fetch2/clearcase.py
@@ -9,7 +9,7 @@ Usage in the recipe:
SRC_URI = "ccrc://cc.example.org/ccrc;vob=/example_vob;module=/example_module"
SRCREV = "EXAMPLE_CLEARCASE_TAG"
- PV = "${@d.getVar("SRCREV").replace("/", "+")}"
+ PV = "${@d.getVar("SRCREV", False).replace("/", "+")}"
The fetcher uses the rcleartool or cleartool remote client, depending on which one is available.
@@ -113,7 +113,7 @@ class ClearCase(FetchMethod):
if data.getVar("SRCREV", d, True) == "INVALID":
raise FetchError("Set a valid SRCREV for the clearcase fetcher in your recipe, e.g. SRCREV = \"/main/LATEST\" or any other label of your choice.")
- ud.label = d.getVar("SRCREV")
+ ud.label = d.getVar("SRCREV", False)
ud.customspec = d.getVar("CCASE_CUSTOM_CONFIG_SPEC", True)
ud.server = "%s://%s%s" % (ud.proto, ud.host, ud.path)
diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index d079a33c6..5a6631a38 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/lib/bb/fetch2/perforce.py
@@ -48,7 +48,7 @@ class Perforce(FetchMethod):
(user, pswd, host, port) = path.split('@')[0].split(":")
path = path.split('@')[1]
else:
- (host, port) = d.getVar('P4PORT').split(':')
+ (host, port) = d.getVar('P4PORT', False).split(':')
user = ""
pswd = ""