[CONSOLIDATED,PULL,04/25] autotools.bbclass: Don't copy into non-existant directory

Submitted by Saul Wold on Feb. 23, 2012, 3:58 p.m. | Patch ID: 21793


Message ID 0178fb54fe32c55679a023dcef9f24abaa9900ea.1330012543.git.sgw@linux.intel.com
State New
Headers show

Commit Message

Saul Wold Feb. 23, 2012, 3:58 p.m.
From: Andreas Oberritter <obi@opendreambox.org>

* 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.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
 meta/classes/autotools.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 5d74333..e22ea68 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -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/