summaryrefslogtreecommitdiff
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-20 09:16:34 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-20 09:16:34 +0000
commit8aee6b32a09dbbce304018f169eb6623182622c5 (patch)
tree24f1f9de0d57e15e126e840c6905805cbf9386a6 /meta/classes/update-alternatives.bbclass
parent8174ba42226d2e590879c0adb03272c35b1b9946 (diff)
downloadopenembedded-core-8aee6b32a09dbbce304018f169eb6623182622c5.tar.gz
openembedded-core-8aee6b32a09dbbce304018f169eb6623182622c5.tar.bz2
openembedded-core-8aee6b32a09dbbce304018f169eb6623182622c5.zip
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
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r--meta/classes/update-alternatives.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 6b2b547d5f..c63581c5d1 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -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 () {