summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-09-12 01:32:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-14 22:22:07 +0100
commitb8e2bab119be251e3a3395dc55cf25b32504272c (patch)
tree112b9935eee0cf29390d04aec0b6b9938f15be5b /meta
parent32b82672033013ad89b931aa1235415db699415e (diff)
downloadpoky-b8e2bab119be251e3a3395dc55cf25b32504272c.tar.gz
meta: cleanup d.getVar(var, 1)
(From OE-Core rev: 79fe476be233015c1c90e9c3fb4572267b5551d1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass8
-rw-r--r--meta/classes/package_ipk.bbclass2
-rw-r--r--meta/lib/oe/utils.py4
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc2
-rw-r--r--meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb2
-rw-r--r--meta/recipes-devtools/vala/vala.inc2
-rw-r--r--meta/recipes-support/boost/boost-1.61.0.inc4
8 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index e4e8ee43ea..a6112e8913 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -127,9 +127,9 @@ PACKAGES_DYNAMIC += "^kernel-firmware-.*"
127export OS = "${TARGET_OS}" 127export OS = "${TARGET_OS}"
128export CROSS_COMPILE = "${TARGET_PREFIX}" 128export CROSS_COMPILE = "${TARGET_PREFIX}"
129 129
130KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \ 130KERNEL_PRIORITY ?= "${@int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
131 int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ 131 int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
132 int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" 132 int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[-1])}"
133 133
134KERNEL_RELEASE ?= "${KERNEL_VERSION}" 134KERNEL_RELEASE ?= "${KERNEL_VERSION}"
135 135
@@ -140,7 +140,7 @@ KERNEL_IMAGEDEST = "boot"
140# 140#
141# configuration 141# configuration
142# 142#
143export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}" 143export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE", True) or "ttyS0"}"
144 144
145KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}" 145KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
146 146
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index e32b9cb5fd..930e154bd7 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -245,7 +245,7 @@ python do_package_ipk () {
245 245
246 os.chdir(basedir) 246 os.chdir(basedir)
247 ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH", True), 247 ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH", True),
248 d.getVar("OPKGBUILDCMD",1), pkg, pkgoutdir), shell=True) 248 d.getVar("OPKGBUILDCMD", True), pkg, pkgoutdir), shell=True)
249 if ret != 0: 249 if ret != 0:
250 bb.utils.unlockfile(lf) 250 bb.utils.unlockfile(lf)
251 raise bb.build.FuncFailed("opkg-build execution failed") 251 raise bb.build.FuncFailed("opkg-build execution failed")
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 19db540779..d6545b197d 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -23,13 +23,13 @@ def ifelse(condition, iftrue = True, iffalse = False):
23 return iffalse 23 return iffalse
24 24
25def conditional(variable, checkvalue, truevalue, falsevalue, d): 25def conditional(variable, checkvalue, truevalue, falsevalue, d):
26 if d.getVar(variable,1) == checkvalue: 26 if d.getVar(variable, True) == checkvalue:
27 return truevalue 27 return truevalue
28 else: 28 else:
29 return falsevalue 29 return falsevalue
30 30
31def less_or_equal(variable, checkvalue, truevalue, falsevalue, d): 31def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
32 if float(d.getVar(variable,1)) <= float(checkvalue): 32 if float(d.getVar(variable, True)) <= float(checkvalue):
33 return truevalue 33 return truevalue
34 else: 34 else:
35 return falsevalue 35 return falsevalue
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 59aa04e119..9fa206efe1 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -17,7 +17,7 @@ python do_install () {
17} 17}
18 18
19python do_install_config () { 19python do_install_config () {
20 indir = os.path.dirname(d.getVar('FILE',1)) 20 indir = os.path.dirname(d.getVar('FILE', True))
21 infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r') 21 infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
22 data = infile.read() 22 data = infile.read()
23 infile.close() 23 infile.close()
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 1a1896f91a..1f73b3afab 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -9,7 +9,7 @@ LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \ 9LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \
10 file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2" 10 file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
11 11
12CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" 12CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
13 13
14SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ 14SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
15 file://support-oe-qt4-tools-names.patch \ 15 file://support-oe-qt4-tools-names.patch \
diff --git a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
index 804186dfdd..9b65a991d4 100644
--- a/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ b/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
@@ -32,7 +32,7 @@ EXTRA_OECONF += "--disable-gconf --disable-qconf"
32 32
33# Some packages have the version preceeding the .so instead properly 33# Some packages have the version preceeding the .so instead properly
34# versioned .so.<version>, so we need to reorder and repackage. 34# versioned .so.<version>, so we need to reorder and repackage.
35SOLIBS = "-${@d.getVar('PV',1)[:-2]}.so" 35SOLIBS = "-${@d.getVar('PV', True)[:-2]}.so"
36FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so" 36FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so"
37 37
38BBCLASSEXTEND = "native" 38BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 37aa38f542..34c9db931d 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -11,7 +11,7 @@ HOMEPAGE = "http://vala-project.org"
11LICENSE = "LGPLv2.1" 11LICENSE = "LGPLv2.1"
12LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" 12LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
13 13
14SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}" 14SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
15 15
16SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz" 16SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
17inherit autotools pkgconfig upstream-version-is-even 17inherit autotools pkgconfig upstream-version-is-even
diff --git a/meta/recipes-support/boost/boost-1.61.0.inc b/meta/recipes-support/boost/boost-1.61.0.inc
index 4553677b26..cd9d8a4950 100644
--- a/meta/recipes-support/boost/boost-1.61.0.inc
+++ b/meta/recipes-support/boost/boost-1.61.0.inc
@@ -7,8 +7,8 @@ HOMEPAGE = "http://www.boost.org/"
7LICENSE = "BSL-1.0 & MIT & Python-2.0" 7LICENSE = "BSL-1.0 & MIT & Python-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" 8LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
9 9
10BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" 10BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}"
11BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" 11BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}"
12BOOST_P = "boost_${BOOST_VER}" 12BOOST_P = "boost_${BOOST_VER}"
13 13
14SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2" 14SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"