]> code.ossystems Code Review - openembedded-core.git/commitdiff
useradd.bbclass: add missing functions to preinst
authorChen Qi <Qi.Chen@windriver.com>
Fri, 16 Aug 2013 02:10:12 +0000 (10:10 +0800)
committerSaul Wold <sgw@linux.intel.com>
Tue, 20 Aug 2013 14:09:06 +0000 (07:09 -0700)
The preinst scripts are calling bbnote, bbwarn and bbfatal functions,
but these functions are not written to the preinst scripts.

This patch writes these missing functions to the preinst scripts to
avoid the 'not found' errors.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/useradd.bbclass

index 21daae8d77946d1ea35965877d666579869594f2..eabfc5d39711840b5eadaa47e5c5f63fa9c1a1d2 100644 (file)
@@ -168,6 +168,9 @@ fakeroot python populate_packages_prepend () {
         preinst = d.getVar('pkg_preinst_%s' % pkg, True) or d.getVar('pkg_preinst', True)
         if not preinst:
             preinst = '#!/bin/sh\n'
+        preinst += 'bbnote () {\n%s}\n' % d.getVar('bbnote', True)
+        preinst += 'bbwarn () {\n%s}\n' % d.getVar('bbwarn', True)
+        preinst += 'bbfatal () {\n%s}\n' % d.getVar('bbfatal', True)
         preinst += 'perform_groupadd () {\n%s}\n' % d.getVar('perform_groupadd', True)
         preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd', True)
         preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems', True)