1
0
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:
Richard Purdie
2006-11-20 09:16:34 +00:00
parent 8174ba4222
commit 8aee6b32a0
8 changed files with 130 additions and 109 deletions
+8 -4
View File
@@ -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 () {