All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Create postinstall script for opkg conditionally
@ 2013-03-25  7:22 Kang Kai
  2013-03-25  7:22 ` [PATCH 1/1] opkg: create run-scripts file conditionally Kang Kai
  0 siblings, 1 reply; 7+ messages in thread
From: Kang Kai @ 2013-03-25  7:22 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 3c5f4d54d01887a117bf659fc9af6b2b892c2b08:

  separatebuilddir.inc: mxsldr should never have been added to this list, remove (2013-03-24 14:03:19 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib kangkai/debug-tweaks
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/debug-tweaks

Kang Kai (1):
  opkg: create run-scripts file conditionally

 meta/recipes-devtools/opkg/opkg.inc |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/1] opkg: create run-scripts file conditionally
  2013-03-25  7:22 [PATCH 0/1] Create postinstall script for opkg conditionally Kang Kai
@ 2013-03-25  7:22 ` Kang Kai
  2013-03-25 14:32   ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Kang Kai @ 2013-03-25  7:22 UTC (permalink / raw)
  To: openembedded-core

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
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] opkg: create run-scripts file conditionally
  2013-03-25  7:22 ` [PATCH 1/1] opkg: create run-scripts file conditionally Kang Kai
@ 2013-03-25 14:32   ` Richard Purdie
  2013-03-26  2:16     ` Kang Kai
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-03-25 14:32 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] opkg: create run-scripts file conditionally
  2013-03-25 14:32   ` Richard Purdie
@ 2013-03-26  2:16     ` Kang Kai
  0 siblings, 0 replies; 7+ messages in thread
From: Kang Kai @ 2013-03-26  2:16 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 2013年03月25日 22:32, Richard Purdie wrote:
> 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...

This just happens on sdk image.

update-alternatives-cworth is default installed into sato image. And for 
sato-sdk image, it installs every related -dev package.  
update-alternatives-cworth is from opkg,
so opkg-dev is installed then it requires opkg, then opkg is installed 
into sato-sdk image.

This patch is try to fix this issue. I'll send V2 to update commit comments.

Regards,
Kai

>
> Cheers,
>
> Richard
>
>
>
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] opkg: create run-scripts file conditionally
  2013-04-02 21:02   ` Saul Wold
@ 2013-04-03  1:50     ` Kang Kai
  0 siblings, 0 replies; 7+ messages in thread
From: Kang Kai @ 2013-04-03  1:50 UTC (permalink / raw)
  To: Saul Wold; +Cc: openembedded-core

On 2013年04月03日 05:02, Saul Wold wrote:
> On 03/25/2013 11:43 PM, Kang Kai wrote:
>> This bug occurs on rpm-based sdk image.
>>
>> update-alternatives-cworth is default installed into sato image. And for
>> sato-sdk image, it installs every related dev packages.
>> update-alternatives-cworth is from opkg, so opkg-dev is installed and it
>> requires opkg, then opkg is installed into sato-sdk image.
>>
>> This causes the script file run-postinsts installed by rpm will be
>> overwrited by opkg on rpm-based sdk image.
>>
>> 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
>> +
> I understand what you are trying to do here, I think Richard was 
> questioning if this is the right implementation of the change. I think 
> if you look at how RPM does it and then make the *run-postinsts script 
> an update-alternatives so each package system does it consistently, 
> this will also require a change to dpkg.
>
> Then there might have to be some setting of the PRIORITY for when each 
> package system is installed.
Thanks. I'll re-implement it.

Regards,
Kai


>
> Sau!
>
>> install -d $D${sysconfdir}/rcS.d
>> # this happens at S98 where our good 'ole packages script used to run
>> echo "#!/bin/sh
>>
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/1] opkg: create run-scripts file conditionally
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Saul Wold @ 2013-04-02 21:02 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

On 03/25/2013 11:43 PM, Kang Kai wrote:
> This bug occurs on rpm-based sdk image.
>
> update-alternatives-cworth is default installed into sato image. And for
> sato-sdk image, it installs every related dev packages.
> update-alternatives-cworth is from opkg, so opkg-dev is installed and it
> requires opkg, then opkg is installed into sato-sdk image.
>
> This causes the script file run-postinsts installed by rpm will be
> overwrited by opkg on rpm-based sdk image.
>
> 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
> +
I understand what you are trying to do here, I think Richard was 
questioning if this is the right implementation of the change. I think 
if you look at how RPM does it and then make the *run-postinsts script 
an update-alternatives so each package system does it consistently, this 
will also require a change to dpkg.

Then there might have to be some setting of the PRIORITY for when each 
package system is installed.

Sau!

>   	install -d $D${sysconfdir}/rcS.d
>   	# this happens at S98 where our good 'ole packages script used to run
>   	echo "#!/bin/sh
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/1] opkg: create run-scripts file conditionally
  2013-03-26  6:43 [PATCH 0/1] V2: Create postinstall script for opkg conditionally Kang Kai
@ 2013-03-26  6:43 ` Kang Kai
  2013-04-02 21:02   ` Saul Wold
  0 siblings, 1 reply; 7+ messages in thread
From: Kang Kai @ 2013-03-26  6:43 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

This bug occurs on rpm-based sdk image.

update-alternatives-cworth is default installed into sato image. And for
sato-sdk image, it installs every related dev packages.
update-alternatives-cworth is from opkg, so opkg-dev is installed and it
requires opkg, then opkg is installed into sato-sdk image.

This causes the script file run-postinsts installed by rpm will be
overwrited by opkg on rpm-based sdk image.

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
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-03  2:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-03-26  2:16     ` Kang Kai
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.