summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
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 () {