Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] autotools.bbclass: Don't copy into non-existant directory
@ 2012-02-10 18:00 Andreas Oberritter
  2012-02-11  2:07 ` Khem Raj
  2012-02-24 18:29 ` Saul Wold
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Oberritter @ 2012-02-10 18:00 UTC (permalink / raw)
  To: openembedded-core

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

* 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(-)

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/
                             fi
 			  fi
-- 
1.7.5.4


[-- Attachment #2: Attached Message Part --]
[-- Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] autotools.bbclass: Don't copy into non-existant directory
  2012-02-10 18:00 [PATCH] autotools.bbclass: Don't copy into non-existant directory Andreas Oberritter
@ 2012-02-11  2:07 ` Khem Raj
  2012-02-11 16:02   ` Andreas Oberritter
  2012-02-24 18:29 ` Saul Wold
  1 sibling, 1 reply; 4+ messages in thread
From: Khem Raj @ 2012-02-11  2:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On (10/02/12 19:00), Andreas Oberritter wrote:
> * 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 ?

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


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


-- 
-Khem



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

* Re: [PATCH] autotools.bbclass: Don't copy into non-existant directory
  2012-02-11  2:07 ` Khem Raj
@ 2012-02-11 16:02   ` Andreas Oberritter
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Oberritter @ 2012-02-11 16:02 UTC (permalink / raw)
  To: openembedded-core

On 11.02.2012 03:07, Khem Raj wrote:
> On (10/02/12 19:00), Andreas Oberritter wrote:
>> * 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 ?

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

>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>> ---
>>  meta/classes/autotools.bbclass |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> 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/
>>                              fi
>>  			  fi
>> -- 
>> 1.7.5.4
>>
> 
> 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> 




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

* Re: [PATCH] autotools.bbclass: Don't copy into non-existant directory
  2012-02-10 18:00 [PATCH] autotools.bbclass: Don't copy into non-existant directory Andreas Oberritter
  2012-02-11  2:07 ` Khem Raj
@ 2012-02-24 18:29 ` Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Saul Wold @ 2012-02-24 18:29 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 02/10/2012 10:00 AM, Andreas Oberritter wrote:
> * 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(-)
>
> 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/
>                               fi
>   			  fi
>
Merged into OE-core

Thanks
	Sau!

>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

end of thread, other threads:[~2012-02-24 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 18:00 [PATCH] autotools.bbclass: Don't copy into non-existant directory Andreas Oberritter
2012-02-11  2:07 ` Khem Raj
2012-02-11 16:02   ` Andreas Oberritter
2012-02-24 18:29 ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox