[OE-core] [oe-commits] [openembedded-core] 01/02: systemd-compat-units: pkg_postinst() does not work
Martin Jansa
martin.jansa at gmail.com
Mon Aug 22 14:20:37 UTC 2016
On Thu, Aug 18, 2016 at 03:52:33PM +0000, git at git.openembedded.org wrote:
> rpurdie pushed a commit to branch master
> in repository openembedded-core.
>
> commit 8183309080aee45746daaff46b0506b09b5bd269
> Author: Joe Slater <jslater at windriver.com>
> AuthorDate: Mon Aug 15 16:04:53 2016 -0700
>
> systemd-compat-units: pkg_postinst() does not work
>
> The test for various files is wrong and will always be
> true, even if init.d does not exist.
>
> Exit if init.d does not exist, and correctly test for
> file existence otherwise.
>
> Signed-off-by: Joe Slater <jslater at windriver.com>
> Signed-off-by: Ross Burton <ross.burton at intel.com>
> ---
> meta/recipes-core/systemd/systemd-compat-units.bb | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
> index 0b8ff09..90811da 100644
> --- a/meta/recipes-core/systemd/systemd-compat-units.bb
> +++ b/meta/recipes-core/systemd/systemd-compat-units.bb
> @@ -23,21 +23,24 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
> "
>
> pkg_postinst_${PN} () {
> - cd $D${sysconfdir}/init.d
>
> - echo "Disabling the following sysv scripts: "
> + cd $D${sysconfdir}/init.d || exit 0
>
> - OPTS=""
> + echo "Disabling the following sysv scripts: "
>
> if [ -n "$D" ]; then
> OPTS="--root=$D"
> + else
> + OPTS=""
> fi
>
> for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
> - if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service \) ] ; then
> - echo -n "$i: " ; systemctl ${OPTS} mask $i.service
> + if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
> + echo -n "$i: "
> + systemctl $OPTS mask $i.service
> fi
> - done ; echo
> + done
> + echo
> }
>
> -RDPEPENDS_${PN} = "systemd"
> +RDEPENDS_${PN} = "systemd"
This is good typo fix, but also causes allarch systemd-compat-units to
RDEPENDS on TUNE_PKGARCH systemd as reported in:
http://lists.openembedded.org/pipermail/openembedded-core/2016-August/125483.html
So either please exclude it in layer.conf for drop this runtime
dependency completely.
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160822/2967295f/attachment-0002.sig>
More information about the Openembedded-core
mailing list