need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1)
if need_machine:
- import re
- this_machine = bb.data.getVar('MACHINE', d, 1)
- if this_machine and not re.match(need_machine, this_machine):
- raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
+ import re
+ this_machine = bb.data.getVar('MACHINE', d, 1)
+ if this_machine and not re.match(need_machine, this_machine):
+ raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
pn = bb.data.getVar('PN', d, 1)
# OBSOLETE in bitbake 1.7.4
srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
if srcdate != None:
- bb.data.setVar('SRCDATE', srcdate, d)
+ bb.data.setVar('SRCDATE', srcdate, d)
use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1)
if use_nls != None:
return
paths = []
for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
- paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
+ paths.append(bb.data.expand(os.path.join(p, mach_arch), d))
for s in bb.data.getVar('SRC_URI', d, 1).split():
local = bb.data.expand(bb.fetch.localpath(s, d), d)
for mp in paths:
CCACHE_DIR_TARGET = "${TMPDIR}/ccache"
python () {
- if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
- bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d)
- bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d)
+ if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
+ bb.data.setVar('CCACHE_DIR', '${CCACHE_DIR_TARGET}', d)
+ bb.data.setVarFlag('CCACHE_DIR', 'export', '1', d)
}
python () {
- if bb.data.getVar('PN', d, 1) in ['ccdv-native']:
- if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
- bb.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", bb.data.getVar("DEPENDS", d, 1) or ""), d)
- bb.data.setVar("CC", '%s %s' % ("ccdv", bb.data.getVar("CC", d, 1) or ""), d)
- bb.data.setVar("BUILD_CC", '%s %s' % ("ccdv", bb.data.getVar("BUILD_CC", d, 1) or ""), d)
- bb.data.setVar("CCLD", '%s %s' % ("ccdv", bb.data.getVar("CCLD", d, 1) or ""), d)
+ if bb.data.getVar('PN', d, 1) in ['ccdv-native']:
+ if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
+ bb.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", bb.data.getVar("DEPENDS", d, 1) or ""), d)
+ bb.data.setVar("CC", '%s %s' % ("ccdv", bb.data.getVar("CC", d, 1) or ""), d)
+ bb.data.setVar("BUILD_CC", '%s %s' % ("ccdv", bb.data.getVar("BUILD_CC", d, 1) or ""), d)
+ bb.data.setVar("CCLD", '%s %s' % ("ccdv", bb.data.getVar("CCLD", d, 1) or ""), d)
}
def quiet_libtool(bb,d):
update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
}
-def updatealternativesafterparse(d):
+def update_alternatives_after_parse(d):
import bb
if bb.data.getVar('ALTERNATIVE_NAME', d) == None:
raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
python __anonymous() {
- updatealternativesafterparse(d)
+ update_alternatives_after_parse(d)
}
python populate_packages_prepend () {
def update_rc_after_parse(d):
import bb
if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None:
- if bb.data.getVar('INITSCRIPT_NAME', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
- if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
- raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('INITSCRIPT_NAME', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d)
+ if bb.data.getVar('INITSCRIPT_PARAMS', d) == None:
+ raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d)
python __anonymous() {
update_rc_after_parse(d)