diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-20 09:16:34 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-20 09:16:34 +0000 |
commit | 8aee6b32a09dbbce304018f169eb6623182622c5 (patch) | |
tree | 24f1f9de0d57e15e126e840c6905805cbf9386a6 /meta/classes/update-alternatives.bbclass | |
parent | 8174ba42226d2e590879c0adb03272c35b1b9946 (diff) | |
download | poky-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.bbclass | 12 |
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() { | |||
10 | update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} | 10 | update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} |
11 | } | 11 | } |
12 | 12 | ||
13 | def 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 | |||
13 | python __anonymous() { | 20 | python __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 | ||
20 | python populate_packages_prepend () { | 24 | python populate_packages_prepend () { |