diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-11 17:33:43 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 10:24:50 +0100 |
| commit | bfd279de3275abbfaf3e630383ec244131e0375f (patch) | |
| tree | 0d1c90461a890d21444f5d2afb13c52b302427f1 /meta/classes/update-rc.d.bbclass | |
| parent | 99203edda6f0b09d817454d656c100b7a8806b18 (diff) | |
| download | poky-bfd279de3275abbfaf3e630383ec244131e0375f.tar.gz | |
Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-rc.d.bbclass')
| -rw-r--r-- | meta/classes/update-rc.d.bbclass | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index bddead4a25..eef2e8caa0 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass | |||
| @@ -44,42 +44,42 @@ python __anonymous() { | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | python populate_packages_prepend () { | 46 | python populate_packages_prepend () { |
| 47 | def update_rcd_package(pkg): | 47 | def update_rcd_package(pkg): |
| 48 | bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) | 48 | bb.debug(1, 'adding update-rc.d calls to postinst/postrm for %s' % pkg) |
| 49 | localdata = bb.data.createCopy(d) | 49 | localdata = bb.data.createCopy(d) |
| 50 | overrides = localdata.getVar("OVERRIDES", True) | 50 | overrides = localdata.getVar("OVERRIDES", True) |
| 51 | localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides)) | 51 | localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides)) |
| 52 | bb.data.update_data(localdata) | 52 | bb.data.update_data(localdata) |
| 53 | 53 | ||
| 54 | """ | 54 | """ |
| 55 | update_rc.d postinst is appended here because pkg_postinst may require to | 55 | update_rc.d postinst is appended here because pkg_postinst may require to |
| 56 | execute on the target. Not doing so may cause update_rc.d postinst invoked | 56 | execute on the target. Not doing so may cause update_rc.d postinst invoked |
| 57 | twice to cause unwanted warnings. | 57 | twice to cause unwanted warnings. |
| 58 | """ | 58 | """ |
| 59 | postinst = localdata.getVar('pkg_postinst', True) | 59 | postinst = localdata.getVar('pkg_postinst', True) |
| 60 | if not postinst: | 60 | if not postinst: |
| 61 | postinst = '#!/bin/sh\n' | 61 | postinst = '#!/bin/sh\n' |
| 62 | postinst += localdata.getVar('updatercd_postinst', True) | 62 | postinst += localdata.getVar('updatercd_postinst', True) |
| 63 | d.setVar('pkg_postinst_%s' % pkg, postinst) | 63 | d.setVar('pkg_postinst_%s' % pkg, postinst) |
| 64 | 64 | ||
| 65 | prerm = localdata.getVar('pkg_prerm', True) | 65 | prerm = localdata.getVar('pkg_prerm', True) |
| 66 | if not prerm: | 66 | if not prerm: |
| 67 | prerm = '#!/bin/sh\n' | 67 | prerm = '#!/bin/sh\n' |
| 68 | prerm += localdata.getVar('updatercd_prerm', True) | 68 | prerm += localdata.getVar('updatercd_prerm', True) |
| 69 | d.setVar('pkg_prerm_%s' % pkg, prerm) | 69 | d.setVar('pkg_prerm_%s' % pkg, prerm) |
| 70 | 70 | ||
| 71 | postrm = localdata.getVar('pkg_postrm', True) | 71 | postrm = localdata.getVar('pkg_postrm', True) |
| 72 | if not postrm: | 72 | if not postrm: |
| 73 | postrm = '#!/bin/sh\n' | 73 | postrm = '#!/bin/sh\n' |
| 74 | postrm += localdata.getVar('updatercd_postrm', True) | 74 | postrm += localdata.getVar('updatercd_postrm', True) |
| 75 | d.setVar('pkg_postrm_%s' % pkg, postrm) | 75 | d.setVar('pkg_postrm_%s' % pkg, postrm) |
| 76 | 76 | ||
| 77 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) | 77 | pkgs = d.getVar('INITSCRIPT_PACKAGES', True) |
| 78 | if pkgs == None: | 78 | if pkgs == None: |
| 79 | pkgs = d.getVar('UPDATERCPN', True) | 79 | pkgs = d.getVar('UPDATERCPN', True) |
| 80 | packages = (d.getVar('PACKAGES', True) or "").split() | 80 | packages = (d.getVar('PACKAGES', True) or "").split() |
| 81 | if not pkgs in packages and packages != []: | 81 | if not pkgs in packages and packages != []: |
| 82 | pkgs = packages[0] | 82 | pkgs = packages[0] |
| 83 | for pkg in pkgs.split(): | 83 | for pkg in pkgs.split(): |
| 84 | update_rcd_package(pkg) | 84 | update_rcd_package(pkg) |
| 85 | } | 85 | } |
