diff options
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
-rw-r--r-- | meta/classes/update-rc.d.bbclass | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 0c648edb4d..57137c60b4 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
@@ -44,18 +44,23 @@ python populate_packages_prepend () { | |||
44 | bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) | 44 | bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) |
45 | bb.data.update_data(localdata) | 45 | bb.data.update_data(localdata) |
46 | 46 | ||
47 | postinst = '#!/bin/sh\n' | 47 | """ |
48 | update_rc.d postinst is appended here because pkg_postinst may require to | ||
49 | execute on the target. Not doing so may cause update_rc.d postinst invoked | ||
50 | twice to cause unwanted warnings. | ||
51 | """ | ||
52 | postinst = bb.data.getVar('pkg_postinst', localdata, 1) | ||
53 | if not postinst: | ||
54 | postinst = '#!/bin/sh\n' | ||
48 | postinst += bb.data.getVar('updatercd_postinst', localdata, 1) | 55 | postinst += bb.data.getVar('updatercd_postinst', localdata, 1) |
49 | try: | ||
50 | postinst += bb.data.getVar('pkg_postinst', localdata, 1) | ||
51 | except: | ||
52 | pass | ||
53 | bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) | 56 | bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) |
57 | |||
54 | prerm = bb.data.getVar('pkg_prerm', localdata, 1) | 58 | prerm = bb.data.getVar('pkg_prerm', localdata, 1) |
55 | if not prerm: | 59 | if not prerm: |
56 | prerm = '#!/bin/sh\n' | 60 | prerm = '#!/bin/sh\n' |
57 | prerm += bb.data.getVar('updatercd_prerm', localdata, 1) | 61 | prerm += bb.data.getVar('updatercd_prerm', localdata, 1) |
58 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) | 62 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) |
63 | |||
59 | postrm = bb.data.getVar('pkg_postrm', localdata, 1) | 64 | postrm = bb.data.getVar('pkg_postrm', localdata, 1) |
60 | if not postrm: | 65 | if not postrm: |
61 | postrm = '#!/bin/sh\n' | 66 | postrm = '#!/bin/sh\n' |