[OE-core] [PATCH] systemtap: support usrmerge

Mark Hatle mark.hatle at kernel.crashing.org
Wed Oct 23 20:44:08 UTC 2019



On 10/23/19 3:25 PM, Alessio Igor Bogani wrote:
> Signed-off-by: Alessio Igor Bogani <alessio.bogani at elettra.eu>
> ---
>  meta/recipes-kernel/systemtap/systemtap_git.bb | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
> index 6ee3e1c0f7..2efba2e06f 100644
> --- a/meta/recipes-kernel/systemtap/systemtap_git.bb
> +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
> @@ -52,10 +52,13 @@ do_install_append () {
>     fi
>  
>     # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
> -   install -d `dirname ${D}${systemd_unitdir}`
> -   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   if not ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
> +      install -d `dirname ${D}${systemd_unitdir}`
> +      mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
> +   fi
>     rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty

A better check out be:

if [ {D}${prefix}/lib/systemd != `dirname ${D}${systemd_unitdir}` ]; then
   install -d `dirname ${D}${systemd_unitdir}`
   mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
   rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
fi

This way the issue is resolved even if usrmerge isn't enabled, but the user
manually manipulated the paths.
> +
>     # Ensure correct ownership for files copied in
>     chown root:root ${D}${sysconfdir}/stap-exporter/* -R
>  }
> 


More information about the Openembedded-core mailing list