All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base-files: do_install_basefilesissue error
@ 2012-10-22 15:32 Giuseppe CONDORELLI
  2012-10-23  1:40 ` Chris Larson
  2012-10-23  7:54 ` Martin Jansa
  0 siblings, 2 replies; 7+ messages in thread
From: Giuseppe CONDORELLI @ 2012-10-22 15:32 UTC (permalink / raw)
  To: openembedded-core

Fixed error in do_install_basefilesissue, printf is now replaced by echo.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index ba355ee..766b0e5 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -117,11 +117,11 @@ do_install_basefilesissue () {
 
 	install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}  
         if [ -n "${DISTRO_NAME}" ]; then
-		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
-		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
+		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
+		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
 		if [ -n "${DISTRO_VERSION}" ]; then
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
+			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
 		fi
 		echo "\n \l" >> ${D}${sysconfdir}/issue
 		echo >> ${D}${sysconfdir}/issue
-- 
1.7.4.4




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

* Re: [PATCH] base-files: do_install_basefilesissue error
  2012-10-22 15:32 [PATCH] base-files: do_install_basefilesissue error Giuseppe CONDORELLI
@ 2012-10-23  1:40 ` Chris Larson
  2012-10-23  7:54 ` Martin Jansa
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Larson @ 2012-10-23  1:40 UTC (permalink / raw)
  To: Giuseppe CONDORELLI; +Cc: openembedded-core

On Mon, Oct 22, 2012 at 8:32 AM, Giuseppe CONDORELLI
<giuseppe.condorelli@st.com> wrote:
> Fixed error in do_install_basefilesissue, printf is now replaced by echo.
>
> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>

What error? Also, this changes the behavior. printf doesn't print a
newline, echo does (unless you use echo -n). printf's behavior is much
more reliable and portable than echos is.
-- 
Christopher Larson



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

* Re: [PATCH] base-files: do_install_basefilesissue error
  2012-10-22 15:32 [PATCH] base-files: do_install_basefilesissue error Giuseppe CONDORELLI
  2012-10-23  1:40 ` Chris Larson
@ 2012-10-23  7:54 ` Martin Jansa
  2012-10-23  7:56   ` Giuseppe Condorelli
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2012-10-23  7:54 UTC (permalink / raw)
  To: Giuseppe CONDORELLI; +Cc: openembedded-core

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

On Mon, Oct 22, 2012 at 05:32:32PM +0200, Giuseppe CONDORELLI wrote:
> Fixed error in do_install_basefilesissue, printf is now replaced by echo.

Looks like partial revert of

commit a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3
Author: Andrei Gherzan <andrei@gherzan.ro>
Date:   Thu Sep 20 12:56:59 2012 +0300

    Replace "echo -e" with "printf" to have the same behavior in dash or bash

    oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
    any options and furthermore allows 'echo -e' to be the default behavior.
    This means that in dash 'echo -e' will actually print '-e' and interpret
    backslashes by default. We use instead 'printf' builtin command with or
    without '\n' to simulate 'echo -e' or 'echo -n'.
    'printf' needs format while 'echo' can be used without any arguments. So
    'echo >' was replaced by 'printf "" >'.
    'echo' without '-n' flag adds a new line by default so to keep the same
    behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
    used.

    [YOCTO #3138]

with very weak explanation why..

> 
> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> ---
>  meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index ba355ee..766b0e5 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -117,11 +117,11 @@ do_install_basefilesissue () {
>  
>  	install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}  
>          if [ -n "${DISTRO_NAME}" ]; then
> -		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> -		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> +		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> +		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
>  		if [ -n "${DISTRO_VERSION}" ]; then
> -			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
> -			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
> +			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
> +			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
>  		fi
>  		echo "\n \l" >> ${D}${sysconfdir}/issue
>  		echo >> ${D}${sysconfdir}/issue
> -- 
> 1.7.4.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] base-files: do_install_basefilesissue error
  2012-10-23  7:54 ` Martin Jansa
@ 2012-10-23  7:56   ` Giuseppe Condorelli
  0 siblings, 0 replies; 7+ messages in thread
From: Giuseppe Condorelli @ 2012-10-23  7:56 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

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

Yes, you are right.
The mistake was in local setting because DISTRO_VERSION was set to
"-${DATE}" and the minus created
the install error.
Locally solved, please discard the patch.
Thanks,
Giuseppe

2012/10/23 Martin Jansa <martin.jansa@gmail.com>

> On Mon, Oct 22, 2012 at 05:32:32PM +0200, Giuseppe CONDORELLI wrote:
> > Fixed error in do_install_basefilesissue, printf is now replaced by echo.
>
> Looks like partial revert of
>
> commit a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3
> Author: Andrei Gherzan <andrei@gherzan.ro>
> Date:   Thu Sep 20 12:56:59 2012 +0300
>
>     Replace "echo -e" with "printf" to have the same behavior in dash or
> bash
>
>     oe-core removed the prerequisite to have sh as bash. POSIX doesn't
> define
>     any options and furthermore allows 'echo -e' to be the default
> behavior.
>     This means that in dash 'echo -e' will actually print '-e' and
> interpret
>     backslashes by default. We use instead 'printf' builtin command with or
>     without '\n' to simulate 'echo -e' or 'echo -n'.
>     'printf' needs format while 'echo' can be used without any arguments.
> So
>     'echo >' was replaced by 'printf "" >'.
>     'echo' without '-n' flag adds a new line by default so to keep the same
>     behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
>     used.
>
>     [YOCTO #3138]
>
> with very weak explanation why..
>
> >
> > Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> > ---
> >  meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bbb/meta/recipes-core/base-files/
> base-files_3.0.14.bb
> > index ba355ee..766b0e5 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -117,11 +117,11 @@ do_install_basefilesissue () {
> >
> >       install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}
> >          if [ -n "${DISTRO_NAME}" ]; then
> > -             printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > -             printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> > +             echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > +             echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> >               if [ -n "${DISTRO_VERSION}" ]; then
> > -                     printf "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > -                     printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> > +                     echo "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > +                     echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> >               fi
> >               echo "\n \l" >> ${D}${sysconfdir}/issue
> >               echo >> ${D}${sysconfdir}/issue
> > --
> > 1.7.4.4
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>

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

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

* Re: [PATCH] base-files: do_install_basefilesissue error
  2012-10-23  8:57 ` Richard Purdie
@ 2012-10-23  9:00   ` Giuseppe Condorelli
  0 siblings, 0 replies; 7+ messages in thread
From: Giuseppe Condorelli @ 2012-10-23  9:00 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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

Hi Richard,

indeed this patch was erroneously sent twice and in the other one it was
replied the mistake was solved and it is no more valid.
Please discard it as already suggested in the other thread.
Thanks,
Giuseppe

2012/10/23 Richard Purdie <richard.purdie@linuxfoundation.org>

> On Tue, 2012-10-23 at 08:45 +0200, Giuseppe CONDORELLI wrote:
> > Fixed error in do_install_basefilesissue, printf is now replaced by echo.
>
> What kind of error?
>
> Doesn't this change have issues about how newlines are handled?
>
> Cheers,
>
> Richard
>
>
> > Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> > ---
> >  meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bbb/meta/recipes-core/base-files/
> base-files_3.0.14.bb
> > index ba355ee..766b0e5 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -117,11 +117,11 @@ do_install_basefilesissue () {
> >
> >       install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}
> >          if [ -n "${DISTRO_NAME}" ]; then
> > -             printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > -             printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> > +             echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > +             echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> >               if [ -n "${DISTRO_VERSION}" ]; then
> > -                     printf "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > -                     printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> > +                     echo "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > +                     echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> >               fi
> >               echo "\n \l" >> ${D}${sysconfdir}/issue
> >               echo >> ${D}${sysconfdir}/issue
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

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

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

* Re: [PATCH] base-files: do_install_basefilesissue error
  2012-10-23  6:45 Giuseppe CONDORELLI
@ 2012-10-23  8:57 ` Richard Purdie
  2012-10-23  9:00   ` Giuseppe Condorelli
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2012-10-23  8:57 UTC (permalink / raw)
  To: Giuseppe CONDORELLI; +Cc: openembedded-core

On Tue, 2012-10-23 at 08:45 +0200, Giuseppe CONDORELLI wrote:
> Fixed error in do_install_basefilesissue, printf is now replaced by echo.

What kind of error?

Doesn't this change have issues about how newlines are handled?

Cheers,

Richard


> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> ---
>  meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index ba355ee..766b0e5 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -117,11 +117,11 @@ do_install_basefilesissue () {
>  
>  	install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}  
>          if [ -n "${DISTRO_NAME}" ]; then
> -		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> -		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> +		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> +		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
>  		if [ -n "${DISTRO_VERSION}" ]; then
> -			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
> -			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
> +			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
> +			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
>  		fi
>  		echo "\n \l" >> ${D}${sysconfdir}/issue
>  		echo >> ${D}${sysconfdir}/issue





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

* [PATCH] base-files: do_install_basefilesissue error
@ 2012-10-23  6:45 Giuseppe CONDORELLI
  2012-10-23  8:57 ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Giuseppe CONDORELLI @ 2012-10-23  6:45 UTC (permalink / raw)
  To: openembedded-core

Fixed error in do_install_basefilesissue, printf is now replaced by echo.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index ba355ee..766b0e5 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -117,11 +117,11 @@ do_install_basefilesissue () {
 
 	install -m 644 ${WORKDIR}/issue*  ${D}${sysconfdir}  
         if [ -n "${DISTRO_NAME}" ]; then
-		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
-		printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
+		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
+		echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
 		if [ -n "${DISTRO_VERSION}" ]; then
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
-			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
+			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
+			echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
 		fi
 		echo "\n \l" >> ${D}${sysconfdir}/issue
 		echo >> ${D}${sysconfdir}/issue
-- 
1.7.4.4




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

end of thread, other threads:[~2012-10-23  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 15:32 [PATCH] base-files: do_install_basefilesissue error Giuseppe CONDORELLI
2012-10-23  1:40 ` Chris Larson
2012-10-23  7:54 ` Martin Jansa
2012-10-23  7:56   ` Giuseppe Condorelli
2012-10-23  6:45 Giuseppe CONDORELLI
2012-10-23  8:57 ` Richard Purdie
2012-10-23  9:00   ` Giuseppe Condorelli

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.