summaryrefslogtreecommitdiffstats
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)
downloadpoky-8aee6b32a09dbbce304018f169eb6623182622c5.tar.gz
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() {
10update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} 10update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
11} 11}
12 12
13def update_alternatives_after_parse(d):
14 import bb
15 if bb.data.getVar('ALTERNATIVE_NAME', d) == None:
16 raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
17 if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
18 raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
19
13python __anonymous() { 20python __anonymous() {
14 if bb.data.getVar('ALTERNATIVE_NAME', d) == None: 21 update_alternatives_after_parse(d)
15 raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d)
16 if bb.data.getVar('ALTERNATIVE_PATH', d) == None:
17 raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d)
18} 22}
19 23
20python populate_packages_prepend () { 24python populate_packages_prepend () {