Skip to contentSkip to conversation

base-files: fix 'dash' expanding '\n'

PATCH In review Javier Viguera 3 participants 4 messages Feb 20, 2013 – Feb 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base-files: fix 'dash' expanding '\n'

Dash's 'echo' command expands '\n' by default, so the '\n' is not included in the '/etc/issue' file.

Use 'printf' for portability between different shells.

---

Probably also worth to be cherry-picked to 'danny' branch.

 meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -1
index 6a3db50..e7a9d82 100644
@@ -129,7 +129,7 @@ do_install_basefilesissue () {
 			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
 			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
 		fi
-		echo "\n \l" >> ${D}${sysconfdir}/issue
+		printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
 		echo >> ${D}${sysconfdir}/issue
 		echo "%h"    >> ${D}${sysconfdir}/issue.net
 		echo >> ${D}${sysconfdir}/issue.net
#1 lore raw

Hi all,

I just saw this patch i sent last week was pushed to openembedded-core/poky *master* branches. Thanks for that.

But in my development i am using stable 'danny' branches.

Any chance that this patch gets cherry-picked to 'danny' on openembedded-core and poky repos?

-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.

Quoted 27 lines · Javier Viguera

Dash's 'echo' command expands '\n' by default, so the '\n' is not included in the '/etc/issue' file.

Use 'printf' for portability between different shells.

---

Probably also worth to be cherry-picked to 'danny' branch.

  meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -1
index 6a3db50..e7a9d82 100644
@@ -129,7 +129,7 @@ do_install_basefilesissue () {
  			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
  			printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
  		fi
-		echo "\n \l" >> ${D}${sysconfdir}/issue
+		printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
  		echo >> ${D}${sysconfdir}/issue
  		echo "%h"    >> ${D}${sysconfdir}/issue.net
  		echo >> ${D}${sysconfdir}/issue.net
#2 lore raw
Quoted 10 lines · Javier Viguera

Hi all,

I just saw this patch i sent last week was pushed to openembedded-core/poky *master* branches. Thanks for that.

But in my development i am using stable 'danny' branches.

Any chance that this patch gets cherry-picked to 'danny' on openembedded-core and poky repos?

In the future, patches for Stable releases should mention that in the patch request. We are spinning the rc1 of Danny Update (1.3.1) now, so it will not make this release, but could be considered for the next one.

Thanks for your contribution

Sau!

Quoted 43 lines

-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.

Quoted 20 lines · Javier Viguera

Dash's 'echo' command expands '\n' by default, so the '\n' is not included in the '/etc/issue' file.

Use 'printf' for portability between different shells.

---

Probably also worth to be cherry-picked to 'danny' branch.

  meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +0 -0
index 6a3db50..e7a9d82 100644

meta/recipes-core/base-files/base-files_3.0.14.bb do_install_basefilesissue () { · line 135

Quoted 8 lines
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -1
@@ -129,7 +129,7 @@ do_install_basefilesissue () {
              printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue
              printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/issue.net
          fi
-        echo "\n \l" >> ${D}${sysconfdir}/issue
+        printf "\\\n \\\l\n" >> ${D}${sysconfdir}/issue
          echo >> ${D}${sysconfdir}/issue
          echo "%h"    >> ${D}${sysconfdir}/issue.net
          echo >> ${D}${sysconfdir}/issue.net

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#3 lore raw
In reply to Javier Viguera
Quoted 2 lines · Javier Viguera

Any chance that this patch gets cherry-picked to 'danny' on openembedded-core and poky repos?

Integrated into the danny-next branch but unless the current 1.3.1 RC goes terribly wrong this will have to wait until 1.3.2.

Ross