Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Kang Kai <kai.kang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] opkg: create run-scripts file conditionally
Date: Mon, 25 Mar 2013 14:32:22 +0000	[thread overview]
Message-ID: <1364221942.3097.52.camel@ted> (raw)
In-Reply-To: <47ae8648840c30e4a9f5dab2b9cb09db905747be.1364196012.git.kai.kang@windriver.com>

On Mon, 2013-03-25 at 15:22 +0800, Kang Kai wrote:
> When build sato sdk image, opkg will be installed to image even the
> image package type is set to RPM. This causes the script file
> run-postinsts installed by rpm will be overwrited by opkg.
> 
> Judge the image package type and don't create run-scripts file when
> package type is not ipk.
> 
> [YOCTO #3223]
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/recipes-devtools/opkg/opkg.inc |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-devtools/opkg/opkg.inc b/meta/recipes-devtools/opkg/opkg.inc
> index f9c1202..bc80cb0 100644
> --- a/meta/recipes-devtools/opkg/opkg.inc
> +++ b/meta/recipes-devtools/opkg/opkg.inc
> @@ -59,10 +59,16 @@ do_install_append_class-native() {
>  
>  POSTLOG ?= "/var/log/postinstall.log"
>  REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
> +PKGTYPE = "${@d.getVar('IMAGE_PKGTYPE', True)}"
>  
>  pkg_postinst_${PN} () {
>  #!/bin/sh
>  if [ "x$D" != "x" ]; then
> +	# if installed to a rpm/deb based image, don't create run-postinsts file
> +	if [ "x${PKGTYPE}" != "xipk" ]; then
> +		exit 0
> +	fi
> +
>  	install -d $D${sysconfdir}/rcS.d
>  	# this happens at S98 where our good 'ole packages script used to run
>  	echo "#!/bin/sh

Why are you trying to install opkg into an non-opkg rootfs in the first
place? This looks like it will create subtle package differences
depending on configuration and I'm wary of this...

Cheers,

Richard






  reply	other threads:[~2013-03-25 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  7:22 [PATCH 0/1] Create postinstall script for opkg conditionally Kang Kai
2013-03-25  7:22 ` [PATCH 1/1] opkg: create run-scripts file conditionally Kang Kai
2013-03-25 14:32   ` Richard Purdie [this message]
2013-03-26  2:16     ` Kang Kai
  -- strict thread matches above, loose matches on Subject: below --
2013-03-26  6:43 [PATCH 0/1] V2: Create postinstall script for opkg conditionally Kang Kai
2013-03-26  6:43 ` [PATCH 1/1] opkg: create run-scripts file conditionally Kang Kai
2013-04-02 21:02   ` Saul Wold
2013-04-03  1:50     ` Kang Kai

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=1364221942.3097.52.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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