aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-09 15:49:33 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2011-04-22 19:41:12 +0200
commit4d41374dd0945d227ecd37d6459f750144ba8daa (patch)
treec576abb16b8c3bd04bfb2c8fc448728d3084c48b
parent83235596304c83db7f8e2905f412935590d3af30 (diff)
downloadopenembedded-4d41374dd0945d227ecd37d6459f750144ba8daa.zip
openembedded-4d41374dd0945d227ecd37d6459f750144ba8daa.tar.gz
openembedded-4d41374dd0945d227ecd37d6459f750144ba8daa.tar.bz2
Add flags for variable typing
Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--classes/base.bbclass1
-rw-r--r--classes/image.bbclass3
-rw-r--r--classes/patch.bbclass5
-rw-r--r--conf/bitbake.conf36
4 files changed, 45 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 093f815..35fa512 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -88,6 +88,7 @@ DEPENDS_virtclass-nativesdk_prepend="${@base_deps(d)} "
SCENEFUNCS += "base_scenefunction"
+SCENEFUNCS[type] = "list"
python base_scenefunction () {
stamp = bb.data.getVar('STAMP', d, 1) + ".needclean"
diff --git a/classes/image.bbclass b/classes/image.bbclass
index d98ba5c..7c1f3e1 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -31,6 +31,7 @@ IMAGE_BOOT ?= "${IMAGE_INITSCRIPTS} \
# some default locales
IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
+IMAGE_LINGUAS[type] = "list"
LINGUAS_INSTALL = ""
LINGUAS_INSTALL_linux = "${@base_ifelse(d.getVar('IMAGE_LINGUAS', True), \
@@ -44,6 +45,7 @@ RDEPENDS += "${@' '.join(oe.packagegroup.active_packages('${IMAGE_FEATURES}'.spl
IMAGE_FEATURES ?= ""
+IMAGE_FEATURES[type] = "list"
IMAGE_FEATURES_prepend = "image_base "
# Define our always included package group
@@ -85,6 +87,7 @@ do_rootfs[recrdeptask] += "do_deploy do_populate_sysroot"
EXCLUDE_FROM_WORLD = "1"
USE_DEVFS ?= "0"
+USE_DEVFS[type] = "boolean"
PID = "${@os.getpid()}"
diff --git a/classes/patch.bbclass b/classes/patch.bbclass
index 7629e9a..bc52ae7 100644
--- a/classes/patch.bbclass
+++ b/classes/patch.bbclass
@@ -5,6 +5,11 @@ QUILTRCFILE ?= "${STAGING_BINDIR_NATIVE}/quiltrc"
PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_sysroot"
+PATCHTOOL[type] = "choice"
+PATCHTOOL[choices] = "patch quilt git"
+PATCHRESOLVE[type] = "choice"
+PATCHRESOLVE[choices] = "noop user"
+
python patch_do_patch() {
import oe.patch
import oe.unpack
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 0477afb..b820d82 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -2,6 +2,7 @@
# Recipe Parsing
##################################################################
BBMASK = "/(nonworking|obsolete)/"
+BBMASK[type] = "regex"
##################################################################
# Standard target filesystem layout.
@@ -172,6 +173,7 @@ ASSUME_PROVIDED = "\
texinfo-native \
util-linux-native \
"
+ASSUME_PROVIDED[type] = "list"
##################################################################
# Package default variables.
@@ -211,7 +213,9 @@ HOMEPAGE = "unknown"
# Ensure that -dev packages recommend the corresponding -dev packages of their
# deps, and the same for -dbg.
DEPCHAIN_PRE = ""
+DEPCHAIN_PRE[type] = "list"
DEPCHAIN_POST = "-dev -dbg"
+DEPCHAIN_POST[type] = "list"
DEPENDS = ""
RDEPENDS = ""
@@ -232,8 +236,10 @@ SOLIBSDEV_darwin8 = ".dylib"
SOLIBSDEV_darwin9 = ".dylib"
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-static ${PN}-locale"
+PACKAGES[type] = "list"
#enable this when bitbake is upgraded to cope with ++ values in the field
PACKAGES_DYNAMIC = "${PN}-locale-*"
+PACKAGES_DYNAMIC[type] = "list"
FILES = ""
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
@@ -270,8 +276,14 @@ FILES_${PN}-locale = "${datadir}/locale"
# file:// search paths
FILE_DIRNAME = "${@os.path.dirname(bb.data.getVar('FILE', d))}"
FILESPATHBASE = "${FILE_DIRNAME}"
+FILESPATHBASE[type] = "list"
+FILESPATHBASE[separator] = ":"
FILESPATHPKG = "${PF}:${P}:${PN}:${BP}:${BPN}:files:."
+FILESPATHPKG[type] = "list"
+FILESPATHPKG[separator] = ":"
FILESPATH = "${@':'.join(uniq(os.path.normpath(os.path.join(fp, p, o)) for fp in '${FILESPATHBASE}'.split(':') for p in '${FILESPATHPKG}'.split(':') for o in reversed([''] + filter(None, '${OVERRIDES}'.split(':')))))}"
+FILESPATH[type] = "list"
+FILESPATH[separator] = ":"
FILESDIR = "${@bb.which(d.getVar('FILESPATH', 1), '.')}"
##################################################################
@@ -420,8 +432,11 @@ EXTRA_IMAGEDEPENDS = ""
# by default this is unset and should be so for libtools < 2.4
LIBTOOL_HAS_SYSROOT ?= "no"
+LIBTOOL_HAS_SYSROOT[type] = "boolean"
PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
+PATH[type] = "list"
+PATH[separator] = ":"
export PATH
##################################################################
@@ -595,8 +610,10 @@ BB_LOCALCOUNT_OVERRIDE = "1"
# Value for revision counter in GIT recipes (NNNN in PV="1.0+gitrNNNN+a7401084a72285c8d3485bacf4eed593f303b1b7-r4.4")
LOCALCOUNT = "0"
+LOCALCOUNT[type] = "integer"
SRC_URI = "file://${FILE}"
+SRC_URI[type] = "list"
FAKEROOT = "fakeroot"
@@ -650,6 +667,8 @@ export HOSTNAME := "${@os.uname()[1]}"
PKG_CONFIG_DIR = "${STAGING_LIBDIR}/pkgconfig"
export PKG_CONFIG_PATH = "${STAGING_LIBDIR}/pkgconfig:${STAGING_DATADIR}/pkgconfig"
PKG_CONFIG_PATH .= ":${STAGING_LIBDIR_NATIVE}/pkgconfig:${STAGING_DATADIR_NATIVE}/pkgconfig"
+PKG_CONFIG_PATH[type] = "list"
+PKG_CONFIG_PATH[separator] = ":"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
@@ -670,9 +689,11 @@ ENTERPRISE_DISTRO ?= "0"
BUILDCFG_HEADER = "Build Configuration:"
BUILDCFG_VARS ?= "BB_VERSION METADATA_BRANCH METADATA_REVISION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION"
+BUILDCFG_VARS[type] = "list"
BUILDCFG_VARS_append_arm = " TARGET_FPU"
BUILDCFG_VARS_append_armeb = " TARGET_FPU"
BUILDCFG_NEEDEDVARS ?= "TARGET_ARCH TARGET_OS"
+BUILDCFG_NEEDEDVARS[type] = "list"
###
### Config file processing
@@ -684,6 +705,8 @@ MACHINE_OVERRIDES ?= ""
OVERRIDES = "pn-${PN}:fail-fast:build-${BUILD_OS}:${TARGET_ARCH}:${TARGET_OS}:${DISTRO}:\
${@[':'.join(d.getVar('MACHINE_OVERRIDES', True).split())+':',''][d.getVar('MACHINE_OVERRIDES', True).strip() == '']}\
${MACHINE}:local"
+OVERRIDES[type] = "list"
+OVERRIDES[separator] = ":"
##################################################################
# Include the rest of the config files.
@@ -717,6 +740,7 @@ PCMCIA_MANAGER ?= "pcmcia-cs"
DEFAULT_TASK_PROVIDER ?= "task-base"
MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
IMAGE_ROOTFS_SIZE ?= "65536"
+IMAGE_ROOTFS_SIZE[type] = "integer"
IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
@@ -729,6 +753,7 @@ CACHE := "${CACHE}"
# Default to disabling packaged staging code
export PSTAGING_ACTIVE = "0"
+PSTAGING_ACTIVE[type] = "boolean"
##################################################################
# Magic Cookie for SANITY CHECK
@@ -746,14 +771,21 @@ DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK'
# This is used to limit what packages goes into images built, so set big by default
ROOT_FLASH_SIZE ?= "256"
+ROOT_FLASH_SIZE[type] = "integer"
MACHINE_GUI_CLASS ?= "smallscreen"
+MACHINE_GUI_CLASS[type] = "choice"
+MACHINE_GUI_CLASS[choices] = "bigscreen smallscreen"
# GUI_MACHINE_CLASS is deprecated, please use MACHINE_GUI_CLASS instead
GUI_MACHINE_CLASS ?= "${MACHINE_GUI_CLASS}"
MACHINE_DISPLAY_WIDTH_PIXELS ?= "240"
+MACHINE_DISPLAY_WIDTH_PIXELS[type] = "integer"
MACHINE_DISPLAY_HEIGHT_PIXELS ?= "320"
+MACHINE_DISPLAY_HEIGHT_PIXELS[type] = "integer"
MACHINE_DISPLAY_ORIENTATION ?= "0"
+MACHINE_DISPLAY_ORIENTATION[type] = "boolean"
MACHINE_DISPLAY_BPP ?= "16"
+MACHINE_DISPLAY_BPP[type] = "integer"
DISTRO_EXTRA_RDEPENDS ?= ""
DISTRO_EXTRA_RRECOMMENDS ?= ""
@@ -762,6 +794,9 @@ MACHINE_EXTRA_RRECOMMENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
+DISTRO_FEATURES[type] = "list"
+MACHINE_FEATURES[type] = "list"
+
COMBINED_FEATURES = "\
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} \
${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} \
@@ -792,6 +827,7 @@ COMBINED_FEATURES += "${@base_ifelse( \
(base_contains('MACHINE_FEATURES', 'pcmcia', True, False, d) and \
base_contains('DISTRO_FEATURES', 'pcmcia', True, False, d))), \
'hostap', '')}"
+COMBINED_FEATURES[type] = "list"
# Make sure MACHINE isn't exported
# (breaks binutils at least)