public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Kai <kai.kang@windriver.com>
To: raj.khem@gmail.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [meta-oe][PATCH v2] graphviz: add pkg_postinst script
Date: Tue, 29 Mar 2022 14:10:27 +0800	[thread overview]
Message-ID: <273c4ab0-e84e-7c6f-56f7-1b8726a7a2b5@windriver.com> (raw)
In-Reply-To: <16E0C3F6BCA9DBAD.3733@lists.openembedded.org>

[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]

On 3/29/22 1:48 PM, kai wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> It needs to run `dot -c` first before call 'dot' command, otherwise it
> fails with:
>
> | Format: "png" not recognized. No formats found.
> | Perhaps "dot -c" needs to be run (with installer's privileges) to
>    register the plugins?
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>

Wrong list. Sorry for the noise.

Kai

> ---
> v2:
> * add guard to check qemu-usermode is supported
>
>   .../graphviz/graphviz_2.50.0.bb               | 19 ++++++++++++++++++-
>   1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb b/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
> index 0eca7fdba..66353b837 100644
> --- a/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
> +++ b/meta-oe/recipes-graphics/graphviz/graphviz_2.50.0.bb
> @@ -17,7 +17,7 @@ DEPENDS = " \
>   DEPENDS:append:class-target = " ${BPN}-native"
>   DEPENDS:append:class-nativesdk = " ${BPN}-native"
>   
> -inherit autotools-brokensep pkgconfig gettext
> +inherit autotools-brokensep pkgconfig gettext qemu
>   
>   SRC_URI = "https://gitlab.com/api/v4/projects/4207231/packages/generic/${BPN}-releases/${PV}/${BP}.tar.xz \
>              "
> @@ -81,6 +81,23 @@ graphviz_sstate_postinst() {
>   }
>   SYSROOT_PREPROCESS_FUNCS:append:class-native = " graphviz_sstate_postinst"
>   
> +pkg_postinst:${PN} () {
> +    if [ -n "$D" ]; then
> +        if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'true', 'false', d)}; then
> +            ${@qemu_run_binary(d, '$D', '${bindir}/dot')} -c
> +        fi
> +    else
> +        dot -c
> +    fi
> +}
> +
> +pkg_postrm:${PN} () {
> +    rm -f $D${libdir}/graphviz/config*
> +    rmdir --ignore-fail-on-non-empty $D${libdir}/graphviz
> +}
> +
> +PACKAGE_WRITE_DEPS += "qemu-native"
> +
>   PACKAGES =+ "${PN}-python ${PN}-perl ${PN}-demo"
>   
>   FILES:${PN}-python += "${libdir}/python*/site-packages/ ${libdir}/graphviz/python/"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#163732): https://lists.openembedded.org/g/openembedded-core/message/163732
> Mute This Topic: https://lists.openembedded.org/mt/90102726/3616933
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kai.kang@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

-- 
Kai Kang
Wind River Linux


[-- Attachment #2: Type: text/html, Size: 3909 bytes --]

           reply	other threads:[~2022-03-29  6:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <16E0C3F6BCA9DBAD.3733@lists.openembedded.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=273c4ab0-e84e-7c6f-56f7-1b8726a7a2b5@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox