summaryrefslogtreecommitdiffstats
path: root/meta/classes/update-rc.d.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* update-rc.d: support enable/disable optionsChangqing Li2019-06-211-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update-rc.d has added support of enable/disable options, which are expected to keep the previous configuration even after upgrade the packages. With support for these options, it will only create start/stop link when there are none, or it will keep the previous configuration. Our preinst uses "-f remove" to remove any links under the /etc/rcrunlevel.d which is conflicting behavior with disable/enable options, so remove it. For example, if a user disabled one service before upgrade, then after upgrade the service could be started. This happens because during preinst, all links have been deleted, then postinst may create the link to start service. With this change, we remove preinst and therefore keep the previous links so that after upgrade, if a link existed for the package, then the postinst will not create new start/stop links. * remove '-f' for postinst. Previously, the keepalived recipe used 'remove' during postinst, so we needed the -f, but now the keepalived recipe has fixed this problem, so it's safe to remove '-f'. [Yocto #12955] (From OE-Core rev: 7981d5261429cfb06030280460086f9af91876d9) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: add -f into postinst OPTChangqing Li2018-10-161-2/+2
| | | | | | | | | | | | | | | | | | add -f into postinst OPT to fix run postinst scriptlet fail problem during do rootfs, while INITSCRIPT_PARAMS set to remove. + type update-rc.d + '[' -n qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs ']' + OPT='-r qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs' + update-rc.d -r work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs keepalived remove update-rc.d: work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs/etc/init.d/keepalived exists during rc.d purge (use -f to force) D: %post(keepalived-1.4.2-r0.core2_64): waitpid(305974) rc 305974 status 100 (From OE-Core rev: 45224526edbe65012a846c066d2b539a360f0c51) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: QA regression.Armin Kuster2018-02-241-1/+2
| | | | | | | | | | | | | | I noticed many new QA warning with arm64 mulitlib suspicious values 'initd-functions-dev' in RRECOMMENDS [multilib] I believe this is a regression via commit http://cgit.openembedded.org/openembedded-core/commit/meta/classes/update-rc.d.bbclass?id=cdcebd81c872cb7386c658998e27cf24e1d0447c (From OE-Core rev: 223119dc96d2e37e3788df630d1995bf56dc156a) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "classes: Fix alternatives and rc.d ordering"Markus Lehtonen2017-12-021-18/+2
| | | | | | | | | | | | This kludge is not needed anymore, now that syslog packages (or any other package) don't use update-alternatives for managing SysV init scripts. This reverts commit fc89a3f739ff25306ea91d9bdb424fc8389bdf72. [YOCTO #10944] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: don't use update-alternativesMarkus Lehtonen2017-12-021-2/+1
| | | | | | | | | | | | | Stop using update-alternatives for managing /etc/init.d/functions. Also, make the initscripts-functions subpackage to (runtime) conflict with lsbinitscripts. [YOCTO #10944] (From OE-Core rev: cdcebd81c872cb7386c658998e27cf24e1d0447c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-1/+0
| | | | | | | | | | Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: Add PACKAGE_WRITE_DEPS for postinstJussi Kukkonen2017-01-201-1/+3
| | | | | | | | | | use_updatercd() will always return true in rootfs generation so checking that is not required. (From OE-Core rev: 0db5328ee2a80152904b9f82b738f92e9e38da55) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Fix alternatives and rc.d orderingDavid Vincent2017-01-091-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | When using an alternative as an initscript, the ordering between update-rc.d and update-alternatives tasks during prerm and postinst tasks must always be the following in order to work: * prerm: - stop daemon - remove alternative * postinst: - add alternative - start daemon This patchset adds comments to the scripts generated by both classes and organize the generated sections based on those comments. [YOCTO #10433] Changes since v5: - Remove boolean in d.getVar() calls (From OE-Core rev: aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-14/+14
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: ignore initscript in prerm and preinst when systemd is activeAndreas Oberritter2016-12-081-5/+14
| | | | | | | | | | | | | | In hybrid systemd/sysvinit builds, if the recipe inherits systemd and systemd is installed, we can safely assume that the service gets stopped by the prerm script fragment from systemd.bbclass. This fixes deinstallation of packages with initscripts returning errors when no running service was found. The preinst shouldn't run the initscript either, because postinst will call systemctl restart. (From OE-Core rev: f2cc0fdfd97b097145e40bc52674e17378cec863) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: ignore init script return codeMarkus Lehtonen2016-10-111-2/+2
| | | | | | | | | | | | | | | | | We need to ignore the return code from the init script 'stop' command in the preinst and prerm scriptlets. Otherwise package upgrade or deinstallation (at least when opkg is used) is likely to fail if the daemon is not running. That is because an init script possibly returns '1' if you try to stop a service that is not running which, in turn, causes the scriptlet to fail which, in turn, causes the package (de-)installation to fail. [YOCTO #10299] (From OE-Core rev: daa3c266a7ffa060b52381fa00df518102fceda8) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: check that init script is executable before running itMarkus Lehtonen2016-10-071-1/+1
| | | | | | | | | | | | | Check that the init script that is going to be called in the prerm() script really exists and is executable. There might be a packaging bug or the script might've been removed already earlier in prerm(). [YOCTO #10299] (From OE-Core rev: aabb87c9dbd60fe9467ca0354ec05c275a3f1b1a) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson2016-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: a77b4e543407eee133fbd38ac9b69e90bea541e0) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: Disable class when sysvinit is not in DISTRO_FEATURESMariano Lopez2016-06-151-4/+4
| | | | | | | | | | | | | | When sysvinit is not in use, update-rd.d class adds build dependencies that won't be needed, this patch removes the build dependecies and won't add the task to PACKAGESPLITFUNCS. [YOCTO #9515] (From OE-Core rev: 5b2139a79cd8c280e755923016b3a6e84413184e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: explicitly dep on initscriptsChristopher Larson2015-08-301-3/+1
| | | | | | | | | | | | | | | | | update-rc.d doesn't just want an initscripts package, it wants initscripts-functions. In the case where VIRTUAL-RUNTIME_initscripts is set to nothing, update-rc.d still needs initscripts-functions to satisfy its runtime dependencies. Further, we shouldn't be using a *runtime* virtual in a *build time* variable. This should resolve image creation failures with configurations without sysv initscripts when a recipe inherits update-rc.d and doesn't inherit systemd. (From OE-Core rev: e6642ae0849e5ac3174c643a7693af25d829d6d1) (From OE-Core rev: 833302761df924bb503cc2ad04ecae1023381f8f) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* updated-rc.d: Only add dependencies in target caseRichard Purdie2015-07-261-1/+1
| | | | | | | | | | Avoid errors like: ERROR: Nothing PROVIDES 'nativesdk-update-rc.d' (but virtual:nativesdk:dbus_1.8.18.bb DEPENDS on or otherwise requires it). (From OE-Core rev: 270a1716b02981aad353c266d3d19735fc85cf10) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: Include updated-rc.d in DEPENDSRichard Purdie2015-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | If you build a user of updated-rc.d like udev, as things stand currently nothing pulls in updated-rc.d but there is a dependency added on the package at do_package time. This can lead to errors during rootfs construction either with licensing. The fact its a RRECOMMEND means the image are not deterministic. A particularly good test case for reproducing this is: MACHINE=A bitbake core-image-minimal MACHINE=B bitbake core-image-minimal-initramfs and since the second machine can find the package but not the license manifest, a failure will result. Extending the DEPENDS is the easy way to fix the issues. (From OE-Core rev: 164b1b54c4b3127733bcd0a21b379bb6869693cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict getVar param for (non) expansionRichard Purdie2015-06-231-5/+5
| | | | | | | | | | | | | | Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: add MLPREFIX when set RRECOMMENDSRobert Yang2015-06-111-1/+1
| | | | | | | | | | | | | | Fixed when build with multilib: WARNING: Multilib QA Issue: lib32-alsa-state package lib32-alsa-state - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-modutils-initscripts package lib32-modutils-initscripts - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-init-ifupdown package lib32-init-ifupdown - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-xserver-nodm-init package lib32-xserver-nodm-init - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-sysklogd package lib32-sysklogd - suspicious values 'update-rc.d' in RRECOMMENDS (From OE-Core rev: 43e8192606444c339ef732d611d4cbc18dee21e4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: Improve RRECOMMENDS handlingRichard Purdie2015-05-291-2/+2
| | | | | | | | | | | | | | | | | | | Unfortunately the combination of: RRECOMMENDS_${PN} = "X" UPDATERCPN = "${PN}" RRECOMMENDS_${UPDATERCPN}_append = "Y" is tricky for bitbake to order correctly since RRECOMMENDS_${UPDATERCPN} can become "Y" which can then completely overwrite RRECOMMENDS_${PN}. Avoid these issues and improve handling in general by explictly setting the RRECOMMENDS on the list of packages modified in the general code. (From OE-Core rev: 053b8a4e6b9a4b02c0b1b4bc1e297a1251a901a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: use '-f' option in updatercd_postrmChen Qi2015-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | Use '-f' ('--force') option so that while removing packages using deb, we don't fail because of the following error: update-rc.d: $initd/$bn exists during rc.d purge (use -f to force) Using '-f' option would make this a warning but continue to execute. update-rc.d: $initd/$bn exists during rc.d purge (continuing) We need this option because dpkg package backend have special handling for configuration files. And if files under /etc/init.d are treated as configuration files, we will have errors. (From OE-Core rev: ebb2d557bbf410d98040cdaabbddd7e3ee0a9709) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d/systemd: Remove OVERRIDES dependencyRichard Purdie2014-09-231-0/+1
| | | | | | | | | | | | | Taking run-postinsts and building for two machines which have different OVERRIDES leads to two different sets of stamps for an allarch package. We don't need to depend on OVERRIDES in these classes, the end resulting variables are good enough. We can therefore exclude the dependency and allow a single package to be generated for run-postinsts. (From OE-Core rev: fdc949154e64afb41dd4db3a97be74a15963128d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: fix logic in populate_packages_updatercdChen Qi2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'and' logic for the check is wrong. To make things clear, please see the example below. Say that we have a recipe A, which has a sysv-init style init script named initA and no corresponding service file. The recipe inherits update-rc.d, but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd' inside it, but it doesn't have 'sysvinit'. Now if we build an image, with the 'and' logic in the check, the symlinks for initA would not be installed into /etc/rc?.d directory. This is incorrect. Because there's no corresponding service. The symlinks in /etc/rc?.d/ should be created so that the service would be correctly started at boot time. The logic should really be 'or' in the check. This is actually what the code was when it was originally written. Several different situations are listed below to prove the correctness of the 'or' logic. If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed with corresponding preisnt/postinst generated and added. If 'sysvinit' is not in DISTRO_FEATURES, we have three situations. 1) A has initA and A.service. In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS, so no preinst/postinst about update-rc.d would be added and the symlinks for initA would not be created. 2) A has initA, and the functionality of initA is not implemented internally in systemd. In such situation, symlinks for initA would be installed. 3) A has initA, and the functionality of initA is implemented internally in systemd or in some other recipe. Examples for such situation are alsa-state and keymaps in OE. In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe so that there would be no preinst/postinst scripts about update-rc.d added. (From OE-Core rev: 6272c81509bbdb5d602056ceaa6f2c02bbf47a41) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: Allow to use different initscripts providerMartin Jansa2014-06-101-1/+2
| | | | | | | | | | | | * until now all recipes were respecting VIRTUAL-RUNTIME_initscripts variable but commit bba835fed88c3bd5bb5bd58962034aef57c408d8 hardcoded "initscripts" runtime dependency (From OE-Core rev: 8b4256758ba55dcabe80dd1bf3884cdf1cc39909) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d/useradd: Add additional dependeciesSaul Wold2014-06-061-0/+2
| | | | | | | | | | | | | These dependcies are needed to ensure that thier packages are created correctly since these classes have runtime dependiences in their packages but they are not actually created yet at rootfs time. [YOCTO #6072] (From OE-Core rev: bba835fed88c3bd5bb5bd58962034aef57c408d8) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: Handle multilib case for initscriptsSaul Wold2014-05-111-1/+2
| | | | | | | | | | | | | When building multilib, we also have to add the multlib prefix otherwise we get a WARNING: WARNING: Multilib QA Issue: lib32-dbus package lib32-dbus - suspicious values 'initscripts-functions' in RDEPENDS [YOCTO #6164] (From OE-Core rev: 2e14dbb7f85532220f9aec293ddd4143fae8407b) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Globally replace oe.utils.contains to bb.utils.containsOtavio Salvador2014-04-251-1/+1
| | | | | | | | | | | BitBake has the exact same code as oe.utils.contains so there's no reason to duplicate it. We now rely on the bb.utils.contains code for metadata. (From OE-Core rev: 93499ebc46547f5bf6dcecd5a786ead9f726de28) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: fix inhibit checkKai Kang2014-02-211-1/+1
| | | | | | | | | | | | | | | In update-rc.d.bbclass it checks variable INHIBIT_UPDATERCD_BBCLASS to inhibit from inheriting this class. But it is wrong logic that when 'sysvinit' is in 'DISTRO_FEATURES', INHIBIT_UPDATERCD_BBCLASS will not be checked. Replace 'or' with 'and' to fix it. (From OE-Core rev: a0353102184892f09d3f97f018e457a4684550ea) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/recipes: Remove virtclass referencesRichard Purdie2014-02-131-1/+1
| | | | | | | | | The virtclass overrides will go away at some point (apart from the multilib one). Change them all to class-xxx instead since people enjoy copy and pasting them. (From OE-Core rev: d1c073d2813bd913617990cd047507353ea0c09e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: automatically rdepend on initscripts-funtionsChen Qi2014-02-021-0/+12
| | | | | | | | | | | | | | | Automatically add 'initscripts-functions' to packages when needed. This extra dependency is added only when the package's init script would be used at system start-up. In other words, in a systemd based image, if the package has already got its service files, it will not have this extra dependency. (From OE-Core rev: de875cb8893fd8372dd77babaef54ab2d790693d) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: More optimal DISTRO_FEATURES referencesRichard Purdie2013-12-051-1/+1
| | | | | | | | | Using the contains function results in more optimal sstate checksums resulting in better cache reuse as we as more consistent code. (From OE-Core rev: 9c93526756e7cbbff027c88eb972f877bcb1f057) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: Cleanup package scriptsJacob Kroon2013-11-011-24/+25
| | | | | | | | | | | | | | * Add proper preinst script * Use -n "$D"/-z "$D" checks throughout the scripts * Only set OPT in cases where its used * Don't pass unnecessary -f to update-rc.d in postrm script * Remove outdated comment (From OE-Core rev: 2d9114aaf130179cb13c20c8b045c2694eca6fd9) Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d.bbclass: Fix host/target test in postinstJacob Kroon2013-10-291-1/+1
| | | | | | | | | | | | | | | | | | | When running the postinst script I get a shell warning: sh: argument expected and the service is never stopped. This patch fixes the warning message and stops the service. Patch v2: Hans Beckérus pointed out that the patch is not correct. This version uses the syntax proposed by Hans. I've tested that the postinst script works correctly when run on the target, both when the init script exists and when it doesn't exist. (From OE-Core rev: 7e23557835f756b22b95fa7a1926b5d1d21872c3) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rcd.bbclass: fix host/target testRoss Burton2013-10-161-5/+3
| | | | | | | | | | | "update-rc: Stop and remove service if updating package" (oe-core d91b08) had a bug in it's implementation of a "host or target" test which always resulted in "target", so the rootfs scripts were attempting to restart daemons on the host. (From OE-Core rev: 2b179d90eacc58f0b217f64407782a9174362850) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc: Stop and remove service if updating packageFelipe F. Tonello2013-10-141-1/+17
| | | | | | | | | | | | | | Since when updating packages packages managers do not remove the previous package, it just replaces new files and run pre/post install scripts. This causes not to update update-rc scripts if they were changed. This patch is useful in case the newer package version updated the update-rc script. (From OE-Core rev: d91b08f3a27baa49ae35dc20dba1b2d76e6abd64) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udpated-rc.d: Track postinst/prerm/postrm in task checksumRichard Purdie2013-10-071-0/+2
| | | | | | | | | | When these functions change, the package should rebuild but currently it does not. We need to add the dependencies manually as the dependency code can't track dynamically created variables. (From OE-Core rev: 4003218f774c38bb5de0d95a43153f8b8d7fc4ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Use modern exception raising syntaxRichard Purdie2013-05-091-2/+2
| | | | | | | | | Modern expection rasing syntax is function call format, convert to this to keep python 3 happy and model correct coding style in the core. (From OE-Core rev: f4b382754603d3f1caa13824bcc8d06b568bbc59) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: correctly look up the initscript params with overridesRoss Burton2013-04-101-3/+9
| | | | | | | | | | | | | | The creation of a clone of d with extra OVERRIDES was removed in 72c1fd72d3b479c728e249eaa763116d352e945b but some of the lookups are essential so that variables such as ${INITSCRIPT_PARAMS} get overriden and resolved correctly on a per-package basis. [ YOCTO #3960 ] (From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d, systemd: redirect also stderr from typeMartin Jansa2013-04-021-2/+2
| | | | | | | | | | * different shells different behavior? bash prints 'type: update-rc.d: not found' on stderr busybox's sh on stdout (From OE-Core rev: 45e22312c48b23480bd6dff98702b0691a48f7d1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d/systemd: change communication variable nameRoss Burton2013-03-261-5/+3
| | | | | | | | | | Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the action, for clarity. (From OE-Core rev: cf43320c343437659aee94acd005bf7712f273cd) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rcd: drop depends to recommends, check for update-rcd in scriptsRoss Burton2013-03-261-5/+10
| | | | | | | (From OE-Core rev: 2c403979c03898c679c5a1e1092aec784dbeb77c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rcd.bbclass: handle both sysvinit and systemd features being presentRoss Burton2013-03-261-3/+6
| | | | | | | | | | | | Run the helper if the sysvinit feature is present, or if the systemd feature is present but the systemd class hasn't been inherited. We want to run in the latter case as systemd has sysvinit compatibility, but we don't want to always run so that pure systemd images don't have redundant sysvinit files. (From OE-Core rev: a3856ab19f1d4ae312f559521785ad4384700729) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop none package specific packaging variable accessesRichard Purdie2013-02-171-3/+3
| | | | | | (From OE-Core rev: 24cbe88429ba021d7c461e0271b67106d11d5eb2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: don't do anything if systemd.bbclass is inheritedRoss Burton2013-02-111-8/+11
| | | | | | | | | | | | | | We need the update-rc.d class to work when systemd is being used so that packages that only have SysV init scripts still work. However if a recipe supports both we don't want to install SysV and systemd files under systemd. To solve this, before doing real work in update-rc.d check if the systemd class has been inherited and don't do anything if it has. (From OE-Core rev: 0273a22fec3c9360df2510b759c5bf9af610551f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert: update-rc.d: disable update-rc.d.bbclass when systemd enabledSaul Wold2013-02-081-1/+86
| | | | | | | | | | | | | This was just wrong - when systemd is being used there'll still be packages that use SysV-style init scripts, which systemd supports fine. This reverts commit b94227f7290796f6ebbe5c5ff1680b9b689022b1. (From OE-Core rev: 3f50b61c77406f87d36437cca53573f86f314641) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d: disable update-rc.d.bbclass when systemd enabledRadu Moisan2013-01-201-89/+1
| | | | | | | | | | | update-rc.d is not necessary when systemd is enabled, systemctl is the replacement (From OE-Core rev: eaa82c842d3197e0251a887ba16028c22f9d8d94) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-rc.d:fix support postrm at image creation timeHongxu Jia2013-01-181-1/+5
| | | | | | | | | | | | updatercd_postrm failed at image creation time because "-f -r ${D}" is not used as update-rc.d's option. [YOCTO #3633] (From OE-Core rev: deb8ac868a989f41c0664312a5fb855358be2296) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang2012-11-021-2/+2
| | | | | | | | | | | | | The overrides virtclass-native and virtclass-nativesdk are deprecated, which should be replaced by class-native and class-nativesdk. [YOCTO #3297] (From OE-Core rev: 9fbeab63315fef0dbcc91c5e7051665764758a6e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-34/+34
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie2012-03-051-10/+10
| | | | | | | | | | | | Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>