diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 17:02:47 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:13:00 +0000 |
| commit | f0bda89e9b5cfa666d298a545756157440ae62c1 (patch) | |
| tree | c1c345b4be4db7c9e00b96647bc5fc4092daaede | |
| parent | f8ea6a8eed254b0d50be382efbb54dc0807b7e20 (diff) | |
| download | poky-f0bda89e9b5cfa666d298a545756157440ae62c1.tar.gz | |
update-rc.d: Drop OVERRIDES code
The data store copy and overrides is overkill given the small number
of accesses that are being made. This simplifies the code.
(From OE-Core rev: 72c1fd72d3b479c728e249eaa763116d352e945b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/update-rc.d_real.bbclass | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/meta/classes/update-rc.d_real.bbclass b/meta/classes/update-rc.d_real.bbclass index 83816d6ad6..0cd671fe77 100644 --- a/meta/classes/update-rc.d_real.bbclass +++ b/meta/classes/update-rc.d_real.bbclass | |||
| @@ -50,32 +50,27 @@ python __anonymous() { | |||
| 50 | python populate_packages_prepend () { | 50 | python populate_packages_prepend () { |
| 51 | def update_rcd_package(pkg): | 51 | def update_rcd_package(pkg): |
| 52 | bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) | 52 | bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) |
| 53 | localdata = bb.data.createCopy(d) | ||
| 54 | overrides = localdata.getVar("OVERRIDES", True) | ||
| 55 | localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides)) | ||
| 56 | bb.data.update_data(localdata) | ||
| 57 | |||
| 58 | """ | 53 | """ |
| 59 | update_rc.d postinst is appended here because pkg_postinst may require to | 54 | update_rc.d postinst is appended here because pkg_postinst may require to |
| 60 | execute on the target. Not doing so may cause update_rc.d postinst invoked | 55 | execute on the target. Not doing so may cause update_rc.d postinst invoked |
| 61 | twice to cause unwanted warnings. | 56 | twice to cause unwanted warnings. |
| 62 | """ | 57 | """ |
| 63 | postinst = localdata.getVar('pkg_postinst', True) | 58 | postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) |
| 64 | if not postinst: | 59 | if not postinst: |
| 65 | postinst = '#!/bin/sh\n' | 60 | postinst = '#!/bin/sh\n' |
| 66 | postinst += localdata.getVar('updatercd_postinst', True) | 61 | postinst += d.getVar('updatercd_postinst', True) |
| 67 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 62 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
| 68 | 63 | ||
| 69 | prerm = localdata.getVar('pkg_prerm', True) | 64 | prerm = d.getVar('pkg_prerm_%s' % pkg, True) or d.getVar('pkg_prerm', True) |
| 70 | if not prerm: | 65 | if not prerm: |
| 71 | prerm = '#!/bin/sh\n' | 66 | prerm = '#!/bin/sh\n' |
| 72 | prerm += localdata.getVar('updatercd_prerm', True) | 67 | prerm += d.getVar('updatercd_prerm', True) |
| 73 | d.setVar('pkg_prerm_%s' % pkg, prerm) | 68 | d.setVar('pkg_prerm_%s' % pkg, prerm) |
| 74 | 69 | ||
| 75 | postrm = localdata.getVar('pkg_postrm', True) | 70 | postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) |
| 76 | if not postrm: | 71 | if not postrm: |
| 77 | postrm = '#!/bin/sh\n' | 72 | postrm = '#!/bin/sh\n' |
| 78 | postrm += localdata.getVar('updatercd_postrm', True) | 73 | postrm += d.getVar('updatercd_postrm', True) |
| 79 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 74 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
| 80 | 75 | ||
| 81 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) | 76 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) |
