mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
classes: Standardise whitespace in anonymous python methods and factor out functions for more efficent use by bitbake (as also patched in OE)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@875 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -10,11 +10,15 @@ update_alternatives_postrm() {
|
||||
update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
|
||||
}
|
||||
|
||||
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)
|
||||
if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
|
||||
raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
|
||||
|
||||
python __anonymous() {
|
||||
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)
|
||||
if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
|
||||
raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
|
||||
update_alternatives_after_parse(d)
|
||||
}
|
||||
|
||||
python populate_packages_prepend () {
|
||||
|
||||
Reference in New Issue
Block a user