mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# defaults
|
||||
ALTERNATIVE_PRIORITY = "10"
|
||||
ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
|
||||
|
||||
update_alternatives_postinst() {
|
||||
update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY}
|
||||
}
|
||||
|
||||
update_alternatives_postrm() {
|
||||
update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
python populate_packages_prepend () {
|
||||
pkg = bb.data.getVar('PN', d, 1)
|
||||
bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
|
||||
postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
|
||||
if not postinst:
|
||||
postinst = '#!/bin/sh\n'
|
||||
postinst += bb.data.getVar('update_alternatives_postinst', d, 1)
|
||||
bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
|
||||
postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1)
|
||||
if not postrm:
|
||||
postrm = '#!/bin/sh\n'
|
||||
postrm += bb.data.getVar('update_alternatives_postrm', d, 1)
|
||||
bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
|
||||
}
|
||||
Reference in New Issue
Block a user