Age | Commit message (Collapse) | Author | Files |
|
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)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Avoid errors like:
ERROR: Nothing PROVIDES 'nativesdk-update-rc.d' (but virtual:nativesdk:dbus_1.8.18.bb
DEPENDS on or otherwise requires it).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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 *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* until now all recipes were respecting VIRTUAL-RUNTIME_initscripts
variable but commit bba835fed88c3bd5bb5bd58962034aef57c408d8
hardcoded "initscripts" runtime dependency
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
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]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
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.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Using the contains function results in more optimal sstate checksums
resulting in better cache reuse as we as more consistent code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* 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
Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
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.
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
"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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Modern expection rasing syntax is function call format, convert to this
to keep python 3 happy and model correct coding style in the core.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* different shells different behavior?
bash prints 'type: update-rc.d: not found' on stderr
busybox's sh on stdout
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Rename SYSTEMD_BBCLASS_ENABLED to INHIBIT_UPDATERCD_BBCLASS to reflect the
action, for clarity.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
update-rc.d is not necessary when systemd is enabled,
systemctl is the replacement
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>
|
|
updatercd_postrm failed at image creation time because "-f -r ${D}" is not
used as update-rc.d's option.
[YOCTO #3633]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The overrides virtclass-native and virtclass-nativesdk are deprecated,
which should be replaced by class-native and class-nativesdk.
[YOCTO #3297]
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>
|
|
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>
|
|
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Override UPDATERCD for nativesdk.
Without, update-rc.d is installed to /usr/sbin/update-rc.d
with meta-toolchain if nativesdk recipe inherits update-rc.d. An
example recipe for this is dbus.
Signed-off-by: Bernhard Guillon <Bernhard.Guillon@hale.at>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
update gsmd to use this
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
So far unlike prerm/postrm, update-rc.d has its own postinst method prepended
to pkg_postinst, which may result "System startup links for xxx already exist"
warning in the 1st boot of target image. Some pkg_postinst requires to run on
the target, and thus prepend here makes update-rc.d method executed twice: one
in rootfs creation and the other in the 1st target boot. So adjust the order
to append.
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
|
|
staging function
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
|
|
RDEPENDS as this affects things like the -doc packages
|
|
called on host
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4976 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2370 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2369 311d38ba-8fff-0310-9ca6-ca027cbcb966
|
|
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@885 311d38ba-8fff-0310-9ca6-ca027cbcb966
|