All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] run-postinsts: Replace pi_dir variable test
@ 2018-04-14  6:54 Niko Mauno
  2018-04-16 10:35 ` Burton, Ross
  0 siblings, 1 reply; 2+ messages in thread
From: Niko Mauno @ 2018-04-14  6:54 UTC (permalink / raw)
  To: openembedded-core

Since commit 5159ddcb62682e1b7e63a20a9218ea96e3fe10a2 string length test
performed against pi_dir has effectively never been able to succeed.

Change this to rather test if pi_dir is not an existing directory. By
doing we remove the chance of seeing the following console error message
during first boot to a pristine rootfs:

  'ls: /etc/ipk-postinsts: No such file or directory'

Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 +-
 meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 50c0a1afea..307feb7187 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -43,7 +43,7 @@ remove_rcsd_link () {
 	fi
 }
 
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ]; then
 	remove_rcsd_link
 	exit 0
 fi
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 31c98ec99c..85b3fc867e 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Runs postinstall scripts on first boot of the target device"
 SECTION = "devel"
-PR = "r9"
+PR = "r10"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-- 
2.16.3



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

* Re: [PATCH] run-postinsts: Replace pi_dir variable test
  2018-04-14  6:54 [PATCH] run-postinsts: Replace pi_dir variable test Niko Mauno
@ 2018-04-16 10:35 ` Burton, Ross
  0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2018-04-16 10:35 UTC (permalink / raw)
  To: Niko Mauno; +Cc: OE-core

I'll drop it myself, but in the future note that PR bumps are not required.

Ross

On 14 April 2018 at 07:54, Niko Mauno <niko.mauno@iki.fi> wrote:
> Since commit 5159ddcb62682e1b7e63a20a9218ea96e3fe10a2 string length test
> performed against pi_dir has effectively never been able to succeed.
>
> Change this to rather test if pi_dir is not an existing directory. By
> doing we remove the chance of seeing the following console error message
> during first boot to a pristine rootfs:
>
>   'ls: /etc/ipk-postinsts: No such file or directory'
>
> Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
> ---
>  meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts | 2 +-
>  meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
> index 50c0a1afea..307feb7187 100755
> --- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
> +++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
> @@ -43,7 +43,7 @@ remove_rcsd_link () {
>         fi
>  }
>
> -if [ -z "$pi_dir" ]; then
> +if ! [ -d $pi_dir ]; then
>         remove_rcsd_link
>         exit 0
>  fi
> diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
> index 31c98ec99c..85b3fc867e 100644
> --- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
> +++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
> @@ -1,6 +1,6 @@
>  SUMMARY = "Runs postinstall scripts on first boot of the target device"
>  SECTION = "devel"
> -PR = "r9"
> +PR = "r10"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> --
> 2.16.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

end of thread, other threads:[~2018-04-16 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-14  6:54 [PATCH] run-postinsts: Replace pi_dir variable test Niko Mauno
2018-04-16 10:35 ` Burton, Ross

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.