diff options
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index cab56deb39..48e4a28d83 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -60,8 +60,8 @@ def base_dep_prepend(d): | |||
60 | # we need that built is the responsibility of the patch function / class, not | 60 | # we need that built is the responsibility of the patch function / class, not |
61 | # the application. | 61 | # the application. |
62 | if not d.getVar('INHIBIT_DEFAULT_DEPS'): | 62 | if not d.getVar('INHIBIT_DEFAULT_DEPS'): |
63 | if (d.getVar('HOST_SYS', 1) != | 63 | if (d.getVar('HOST_SYS', True) != |
64 | d.getVar('BUILD_SYS', 1)): | 64 | d.getVar('BUILD_SYS', True)): |
65 | deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc " | 65 | deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc " |
66 | return deps | 66 | return deps |
67 | 67 | ||
@@ -203,7 +203,7 @@ def preferred_ml_updates(d): | |||
203 | 203 | ||
204 | 204 | ||
205 | def get_layers_branch_rev(d): | 205 | def get_layers_branch_rev(d): |
206 | layers = (d.getVar("BBLAYERS", 1) or "").split() | 206 | layers = (d.getVar("BBLAYERS", True) or "").split() |
207 | layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \ | 207 | layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \ |
208 | base_get_metadata_git_branch(i, None).strip(), \ | 208 | base_get_metadata_git_branch(i, None).strip(), \ |
209 | base_get_metadata_git_revision(i, None)) \ | 209 | base_get_metadata_git_revision(i, None)) \ |
@@ -233,7 +233,7 @@ python base_eventhandler() { | |||
233 | if name.startswith("BuildStarted"): | 233 | if name.startswith("BuildStarted"): |
234 | e.data.setVar( 'BB_VERSION', bb.__version__) | 234 | e.data.setVar( 'BB_VERSION', bb.__version__) |
235 | statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU'] | 235 | statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU'] |
236 | statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, 1) or '') for i in statusvars] | 236 | statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, True) or '') for i in statusvars] |
237 | 237 | ||
238 | statuslines += get_layers_branch_rev(e.data) | 238 | statuslines += get_layers_branch_rev(e.data) |
239 | statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines) | 239 | statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines) |
@@ -242,7 +242,7 @@ python base_eventhandler() { | |||
242 | needed_vars = [ "TARGET_ARCH", "TARGET_OS" ] | 242 | needed_vars = [ "TARGET_ARCH", "TARGET_OS" ] |
243 | pesteruser = [] | 243 | pesteruser = [] |
244 | for v in needed_vars: | 244 | for v in needed_vars: |
245 | val = e.data.getVar(v, 1) | 245 | val = e.data.getVar(v, True) |
246 | if not val or val == 'INVALID': | 246 | if not val or val == 'INVALID': |
247 | pesteruser.append(v) | 247 | pesteruser.append(v) |
248 | if pesteruser: | 248 | if pesteruser: |
@@ -344,7 +344,7 @@ python () { | |||
344 | pr = pr_prefix.group(0) + str(nval) + pr[prval.end():] | 344 | pr = pr_prefix.group(0) + str(nval) + pr[prval.end():] |
345 | d.setVar('PR', pr) | 345 | d.setVar('PR', pr) |
346 | 346 | ||
347 | pn = d.getVar('PN', 1) | 347 | pn = d.getVar('PN', True) |
348 | license = d.getVar('LICENSE', True) | 348 | license = d.getVar('LICENSE', True) |
349 | if license == "INVALID": | 349 | if license == "INVALID": |
350 | bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) | 350 | bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) |
@@ -370,36 +370,36 @@ python () { | |||
370 | d.setVarFlag('do_package_setscene', 'fakeroot', 1) | 370 | d.setVarFlag('do_package_setscene', 'fakeroot', 1) |
371 | source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0) | 371 | source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0) |
372 | if not source_mirror_fetch: | 372 | if not source_mirror_fetch: |
373 | need_host = d.getVar('COMPATIBLE_HOST', 1) | 373 | need_host = d.getVar('COMPATIBLE_HOST', True) |
374 | if need_host: | 374 | if need_host: |
375 | import re | 375 | import re |
376 | this_host = d.getVar('HOST_SYS', 1) | 376 | this_host = d.getVar('HOST_SYS', True) |
377 | if not re.match(need_host, this_host): | 377 | if not re.match(need_host, this_host): |
378 | raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host) | 378 | raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host) |
379 | 379 | ||
380 | need_machine = d.getVar('COMPATIBLE_MACHINE', 1) | 380 | need_machine = d.getVar('COMPATIBLE_MACHINE', True) |
381 | if need_machine: | 381 | if need_machine: |
382 | import re | 382 | import re |
383 | this_machine = d.getVar('MACHINE', 1) | 383 | this_machine = d.getVar('MACHINE', True) |
384 | if this_machine and not re.match(need_machine, this_machine): | 384 | if this_machine and not re.match(need_machine, this_machine): |
385 | this_soc_family = d.getVar('SOC_FAMILY', 1) | 385 | this_soc_family = d.getVar('SOC_FAMILY', True) |
386 | if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family: | 386 | if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family: |
387 | raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) | 387 | raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % this_machine) |
388 | 388 | ||
389 | 389 | ||
390 | dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', 1) | 390 | dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) |
391 | if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"): | 391 | if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"): |
392 | hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, 1) or "").split() | 392 | hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or "").split() |
393 | lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, 1) or "").split() | 393 | lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or "").split() |
394 | dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split() | 394 | dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or "").split() |
395 | if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: | 395 | if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: |
396 | 396 | ||
397 | this_license = d.getVar('LICENSE', 1) | 397 | this_license = d.getVar('LICENSE', True) |
398 | if incompatible_license(d,dont_want_license): | 398 | if incompatible_license(d,dont_want_license): |
399 | bb.note("SKIPPING %s because it's %s" % (pn, this_license)) | 399 | bb.note("SKIPPING %s because it's %s" % (pn, this_license)) |
400 | raise bb.parse.SkipPackage("incompatible with license %s" % this_license) | 400 | raise bb.parse.SkipPackage("incompatible with license %s" % this_license) |
401 | 401 | ||
402 | srcuri = d.getVar('SRC_URI', 1) | 402 | srcuri = d.getVar('SRC_URI', True) |
403 | # Svn packages should DEPEND on subversion-native | 403 | # Svn packages should DEPEND on subversion-native |
404 | if "svn://" in srcuri: | 404 | if "svn://" in srcuri: |
405 | d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot') | 405 | d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot') |
@@ -426,8 +426,8 @@ python () { | |||
426 | d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') | 426 | d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') |
427 | 427 | ||
428 | # 'multimachine' handling | 428 | # 'multimachine' handling |
429 | mach_arch = d.getVar('MACHINE_ARCH', 1) | 429 | mach_arch = d.getVar('MACHINE_ARCH', True) |
430 | pkg_arch = d.getVar('PACKAGE_ARCH', 1) | 430 | pkg_arch = d.getVar('PACKAGE_ARCH', True) |
431 | 431 | ||
432 | if (pkg_arch == mach_arch): | 432 | if (pkg_arch == mach_arch): |
433 | # Already machine specific - nothing further to do | 433 | # Already machine specific - nothing further to do |
@@ -458,9 +458,9 @@ python () { | |||
458 | d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}") | 458 | d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}") |
459 | return | 459 | return |
460 | 460 | ||
461 | packages = d.getVar('PACKAGES', 1).split() | 461 | packages = d.getVar('PACKAGES', True).split() |
462 | for pkg in packages: | 462 | for pkg in packages: |
463 | pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, 1) | 463 | pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, True) |
464 | 464 | ||
465 | # We could look for != PACKAGE_ARCH here but how to choose | 465 | # We could look for != PACKAGE_ARCH here but how to choose |
466 | # if multiple differences are present? | 466 | # if multiple differences are present? |