Skip to contentSkip to conversation

autotools.bbclass: Don't copy into non-existant directory

PATCH Applied Andreas Oberritter 3 participants 4 messages Feb 10, 2012 – Feb 24, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autotools.bbclass: Don't copy into non-existant directory

* If configure.ac contains AM_GNU_GETTEXT and po/Makefile.in.in doesn't exist, autotools_do_configure() copies a local version of Makefile.in.in to this location. If the directory 'po' doesn't exist, the function aborts.

* This patch verifies that the directory exists before copying a file to it. This fixes libcddb, which uses AM_GNU_GETTEXT, but has no 'po' directory.

---
 meta/classes/autotools.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/autotools.bbclass +1 -1
index 5d74333..e22ea68 100644
@@ -149,7 +149,7 @@ autotools_do_configure() {
 			  else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
                             # We'd call gettextize here if it wasn't so broken...
 			    cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
-			    if [ ! -e ${S}/po/Makefile.in.in ]; then
+			    if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then
 			      cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
                             fi
 			  fi
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 9 lines · Andreas Oberritter

* If configure.ac contains AM_GNU_GETTEXT and po/Makefile.in.in doesn't exist, autotools_do_configure() copies a local version of Makefile.in.in to this location. If the directory 'po' doesn't exist, the function aborts.

* This patch verifies that the directory exists before copying a file to it. This fixes libcddb, which uses AM_GNU_GETTEXT, but has no 'po' directory.

this patch is ok however did you try to create the dir and then copy over the file if it did not exist ?

Quoted 27 lines
---
 meta/classes/autotools.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/autotools.bbclass +1 -1
index 5d74333..e22ea68 100644
@@ -149,7 +149,7 @@ autotools_do_configure() {
 			  else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
                             # We'd call gettextize here if it wasn't so broken...
 			    cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
-			    if [ ! -e ${S}/po/Makefile.in.in ]; then
+			    if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then
 			      cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
                             fi
 			  fi
Signature · 8 lines
1.7.5.4



_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
-Khem
#2 lore raw
Quoted 6 lines · Khem Raj
Quoted 5 lines · Andreas Oberritter

* If configure.ac contains AM_GNU_GETTEXT and po/Makefile.in.in doesn't exist, autotools_do_configure() copies a local version of Makefile.in.in to this location. If the directory 'po' doesn't exist, the function aborts.

Quoted 7 lines
Quoted 4 lines

* This patch verifies that the directory exists before copying a file to it. This fixes libcddb, which uses AM_GNU_GETTEXT, but has no 'po' directory.

this patch is ok however did you try to create the dir and then copy over the file if it did not exist ?

I didn't, because I don't think it would do anything useful, if there are no other files in po/.

Quoted 29 lines
Quoted 27 lines
---
 meta/classes/autotools.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/autotools.bbclass +1 -1
index 5d74333..e22ea68 100644
@@ -149,7 +149,7 @@ autotools_do_configure() {
 			  else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
                             # We'd call gettextize here if it wasn't so broken...
 			    cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
-			    if [ ! -e ${S}/po/Makefile.in.in ]; then
+			    if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then
 			      cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
                             fi
 			  fi
Signature · 8 lines
1.7.5.4



_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Applied
#3 lore raw
In reply to Andreas Oberritter
Quoted 20 lines · Andreas Oberritter

* If configure.ac contains AM_GNU_GETTEXT and po/Makefile.in.in doesn't exist, autotools_do_configure() copies a local version of Makefile.in.in to this location. If the directory 'po' doesn't exist, the function aborts.

* This patch verifies that the directory exists before copying a file to it. This fixes libcddb, which uses AM_GNU_GETTEXT, but has no 'po' directory.

---
  meta/classes/autotools.bbclass |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/autotools.bbclass +0 -0
index 5d74333..e22ea68 100644

meta/classes/autotools.bbclass autotools_do_configure() { · line 155

Quoted 8 lines
meta/classes/autotools.bbclass +1 -1
@@ -149,7 +149,7 @@ autotools_do_configure() {
  			  else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC>/dev/null; then
                              # We'd call gettextize here if it wasn't so broken...
  			    cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
-			    if [ ! -e ${S}/po/Makefile.in.in ]; then
+			    if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then
  			      cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
                              fi
  			  fi

Merged into OE-core

Thanks
Sau!

Quoted 6 lines

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