> -----Original Message-----
> From: [email protected] 
> <[email protected]> On Behalf Of Randolph Sapp via 
> lists.openembedded.org
> Sent: den 10 juni 2023 03:14
> To: [email protected]; [email protected]; [email protected]; 
> [email protected]
> Cc: [email protected]; Randolph Sapp <[email protected]>
> Subject: [OE-core][PATCH 4/6] weston-init: fix the mixed indentation

AFAIK, the official standard for OE-Core is to use tabs for indentation 
of shell code, and four spaces for Python code and bitbake variables.
(But beware, other layers may use different standards, e.g., 
meta-openembedded uses four spaces for everything.)

> 
> From: Randolph Sapp <[email protected]>
> 
> I know my text editor is going to get angry at me if this continues.

Get a better editor. ;) At least for Emacs there is a bitbake-mode that 
supports the different ways of indenting shell and Python code in the 
same recipe.

> 
> Signed-off-by: Randolph Sapp <[email protected]>
> ---
>  meta/recipes-graphics/wayland/weston-init.bb | 76 ++++++++++----------
>  1 file changed, 38 insertions(+), 38 deletions(-)
> 
> diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-
> graphics/wayland/weston-init.bb
> index 4fa302c833..01abd4ce78 100644
> --- a/meta/recipes-graphics/wayland/weston-init.bb
> +++ b/meta/recipes-graphics/wayland/weston-init.bb
> @@ -26,44 +26,44 @@ DEFAULTBACKEND ??= ""
>  DEFAULTBACKEND:qemuall ?= "drm"
> 
>  do_install() {
> -        if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
> -             install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
> -             sed -i 's#ROOTHOME#${ROOT_HOME}#' 
> ${D}/${sysconfdir}/init.d/weston
> -        fi
> -     install -D -p -m0644 ${WORKDIR}/weston.ini 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> -     install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
> -
> -     # Install Weston systemd service and accompanying udev rule
> -     install -D -p -m0644 ${WORKDIR}/weston.service 
> ${D}${systemd_system_unitdir}/weston.service
> -     install -D -p -m0644 ${WORKDIR}/weston.socket 
> ${D}${systemd_system_unitdir}/weston.socket
> -        if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
> -             install -D -p -m0644 ${WORKDIR}/weston-autologin 
> ${D}${sysconfdir}/pam.d/weston-autologin
> -        fi
> -     sed -i -e s:/etc:${sysconfdir}:g \
> -             -e s:/usr/bin:${bindir}:g \
> -             -e s:/var:${localstatedir}:g \
> -             ${D}${systemd_system_unitdir}/weston.service
> -     # Install weston-start script
> -     install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
> -     sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
> -     sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
> -        if [ -n "${DEFAULTBACKEND}" ]; then
> -             sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> -     fi
> -
> -     if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
> d)}" = "yes" ]; then
> -             sed -i -e "/^\[core\]/a xwayland=true" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> -     fi
> -
> -     if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
> 'no', d)}" = "yes" ]; then
> -             sed -i -e "/^\[core\]/a idle-time=0" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> -     fi
> -
> -     if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', 
> d)}" = "yes" ]; then
> -             sed -i -e "/^\[core\]/a use-pixman=true" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> -     fi
> -
> -     install -dm 755 -o weston -g weston ${D}/home/weston
> +    if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
> +        install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
> +        sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
> +    fi
> +    install -D -p -m0644 ${WORKDIR}/weston.ini 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> +    install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
> +
> +    # Install Weston systemd service and accompanying udev rule
> +    install -D -p -m0644 ${WORKDIR}/weston.service 
> ${D}${systemd_system_unitdir}/weston.service
> +    install -D -p -m0644 ${WORKDIR}/weston.socket 
> ${D}${systemd_system_unitdir}/weston.socket
> +    if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
> +        install -D -p -m0644 ${WORKDIR}/weston-autologin 
> ${D}${sysconfdir}/pam.d/weston-autologin
> +    fi
> +    sed -i -e s:/etc:${sysconfdir}:g \
> +        -e s:/usr/bin:${bindir}:g \
> +        -e s:/var:${localstatedir}:g \
> +        ${D}${systemd_system_unitdir}/weston.service
> +    # Install weston-start script
> +    install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
> +    sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
> +    sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
> +    if [ -n "${DEFAULTBACKEND}" ]; then
> +        sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> +    fi
> +
> +    if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
> d)}" = "yes" ]; then
> +        sed -i -e "/^\[core\]/a xwayland=true" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> +    fi
> +
> +    if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 
> 'no', d)}" = "yes" ]; then
> +        sed -i -e "/^\[core\]/a idle-time=0" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> +    fi
> +
> +    if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', 
> d)}" = "yes" ]; then
> +        sed -i -e "/^\[core\]/a use-pixman=true" 
> ${D}${sysconfdir}/xdg/weston/weston.ini
> +    fi
> +
> +    install -dm 755 -o weston -g weston ${D}/home/weston
>  }
> 
>  INHIBIT_UPDATERCD_BBCLASS = 
> "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', 
> d)}"
> --
> 2.41.0

//Peter

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182640): 
https://lists.openembedded.org/g/openembedded-core/message/182640
Mute This Topic: https://lists.openembedded.org/mt/99441452/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to