All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] sysstat: do not use 'exit 0' to incorrectly postpone to first boot
@ 2018-09-05 12:36 Hongxu Jia
  2018-09-05 12:36 ` [PATCH 2/3] opkg-keyrings: do not use 'exit 1' to " Hongxu Jia
  2018-09-05 12:36 ` [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly " Hongxu Jia
  0 siblings, 2 replies; 5+ messages in thread
From: Hongxu Jia @ 2018-09-05 12:36 UTC (permalink / raw)
  To: openembedded-core, ross.burton

In `6bf82c2 sysstat: don't run populate-volatile.sh update
in do_rootfs, first boot or without populate-volatile.sh',
it used 'exit 0' to incorrect postpone to first boot, after
do_rootfs with `exit 0', there will be no first boot to rerun.

Since `229f4e9 package.bbclass: add support for
pkg_postinst_ontarget()' applied in oe-core, use
pkg_postinst_ontarget to instead.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-extended/sysstat/sysstat.inc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index 0bc7e14..5f9ede2 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -50,10 +50,7 @@ do_install() {
 	sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
 }
 
-pkg_postinst_${PN} () {
-        if [ -n "$D" ]; then
-                exit 0
-        fi
+pkg_postinst_ontarget_${PN} () {
         if [ -e /etc/init.d/populate-volatile.sh ]; then
                 /etc/init.d/populate-volatile.sh update
         fi
-- 
2.8.1



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

* [PATCH 2/3] opkg-keyrings: do not use 'exit 1' to postpone to first boot
  2018-09-05 12:36 [PATCH 1/3] sysstat: do not use 'exit 0' to incorrectly postpone to first boot Hongxu Jia
@ 2018-09-05 12:36 ` Hongxu Jia
  2018-09-05 12:36 ` [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly " Hongxu Jia
  1 sibling, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2018-09-05 12:36 UTC (permalink / raw)
  To: openembedded-core, ross.burton

Since `229f4e9 package.bbclass: add support for
pkg_postinst_ontarget()' applied in oe-core, use
pkg_postinst_ontarget to run postinst at first boot.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
index 18d6abd..a20e316 100644
--- a/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-keyrings_1.0.bb
@@ -35,14 +35,6 @@ FILES_${PN} = "${datadir}/opkg/keyrings"
 # We need 'opkg-key' to run the postinst script
 RDEPENDS_${PN} = "opkg"
 
-pkg_postinst_${PN} () {
-#! /bin/sh
-set -e
-
-if [ x"$D" = "x" ]; then
-    # On target
-    opkg-key populate
-else
-    exit 1
-fi
+pkg_postinst_ontarget_${PN} () {
+opkg-key populate
 }
-- 
2.8.1



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

* [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly postpone to first boot
  2018-09-05 12:36 [PATCH 1/3] sysstat: do not use 'exit 0' to incorrectly postpone to first boot Hongxu Jia
  2018-09-05 12:36 ` [PATCH 2/3] opkg-keyrings: do not use 'exit 1' to " Hongxu Jia
@ 2018-09-05 12:36 ` Hongxu Jia
  2018-09-05 17:34   ` Richard Purdie
  1 sibling, 1 reply; 5+ messages in thread
From: Hongxu Jia @ 2018-09-05 12:36 UTC (permalink / raw)
  To: openembedded-core, ross.burton

After postinst was executed at do_rootfs successfully,
there will be no first boot to redo.

Since `229f4e9 package.bbclass: add support for
pkg_postinst_ontarget()' applied in oe-core, use
pkg_postinst_ontarget to instead.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-devtools/prelink/prelink_git.bb | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index c5eaedd..c110bd2 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -158,13 +158,7 @@ do_install_append () {
 # Prelinking during a cross install should be handled by the image-prelink
 # bbclass.  If the user desires this to run on the target at first boot
 # they will need to create a custom boot script.
-pkg_postinst_prelink() {
-#!/bin/sh
-
-if [ "x$D" != "x" ]; then
-  exit 0
-fi
-
+pkg_postinst_ontarget_prelink() {
 prelink -a
 }
 
-- 
2.8.1



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

* Re: [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly postpone to first boot
  2018-09-05 12:36 ` [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly " Hongxu Jia
@ 2018-09-05 17:34   ` Richard Purdie
  2018-09-06  1:12     ` Hongxu Jia
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2018-09-05 17:34 UTC (permalink / raw)
  To: Hongxu Jia, openembedded-core, ross.burton

On Wed, 2018-09-05 at 08:36 -0400, Hongxu Jia wrote:
> After postinst was executed at do_rootfs successfully,
> there will be no first boot to redo.
> 
> Since `229f4e9 package.bbclass: add support for
> pkg_postinst_ontarget()' applied in oe-core, use
> pkg_postinst_ontarget to instead.
> 
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-devtools/prelink/prelink_git.bb | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/meta/recipes-devtools/prelink/prelink_git.bb
> b/meta/recipes-devtools/prelink/prelink_git.bb
> index c5eaedd..c110bd2 100644
> --- a/meta/recipes-devtools/prelink/prelink_git.bb
> +++ b/meta/recipes-devtools/prelink/prelink_git.bb
> @@ -158,13 +158,7 @@ do_install_append () {
>  # Prelinking during a cross install should be handled by the image-
> prelink
>  # bbclass.  If the user desires this to run on the target at first
> boot
>  # they will need to create a custom boot script.
> -pkg_postinst_prelink() {
> -#!/bin/sh
> -
> -if [ "x$D" != "x" ]; then
> -  exit 0
> -fi
> -
> +pkg_postinst_ontarget_prelink() {
>  prelink -a
>  }

I'm not sure this is correct. The idea here is that no postinst runs,
on target or at rootfs time (since we prelink the rootfs elsewhere at
rootfs time). The only time a postinst runs is if the package is
actually installed onto a target system later on a running system.

I think you change the behaviour here so that it would run on the
target system at first boot?

Cheers,

Richard


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

* Re: [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly postpone to first boot
  2018-09-05 17:34   ` Richard Purdie
@ 2018-09-06  1:12     ` Hongxu Jia
  0 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2018-09-06  1:12 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core, ross.burton

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

On 2018年09月06日 01:34, Richard Purdie wrote:
>> -
>> -if [ "x$D" != "x" ]; then
>> -  exit 0
>> -fi
>> -
>> +pkg_postinst_ontarget_prelink() {
>>   prelink -a
>>   }
> I'm not sure this is correct. The idea here is that no postinst runs,
> on target or at rootfs time (since we prelink the rootfs elsewhere at
> rootfs time). The only time a postinst runs is if the package is
> actually installed onto a target system later on a running system.
>
> I think you change the behaviour here so that it would run on the
> target system at first boot?

Yes, you are right, since the behavior is on purpose, the fix
is not necessary, please drop it.

> Cheers,
>
> Richard



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

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

end of thread, other threads:[~2018-09-06  1:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 12:36 [PATCH 1/3] sysstat: do not use 'exit 0' to incorrectly postpone to first boot Hongxu Jia
2018-09-05 12:36 ` [PATCH 2/3] opkg-keyrings: do not use 'exit 1' to " Hongxu Jia
2018-09-05 12:36 ` [PATCH 3/3] prelink: do not use 'exit 0' to incorrectly " Hongxu Jia
2018-09-05 17:34   ` Richard Purdie
2018-09-06  1:12     ` Hongxu Jia

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.