Patchwork musicbrainz: handle rebuilds

login
register
mail settings
Submitter Ross Burton
Date Jan. 8, 2013, 5:13 p.m.
Message ID <1357665198-8780-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/42337/
State New
Headers show

Comments

Ross Burton - Jan. 8, 2013, 5:13 p.m.
When rebuilding build-native already exists, so don't error when running mkdir.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Diego Rondini - Jan. 9, 2013, 2:18 p.m.
Ross Burton <ross.burton@...> writes:

> 
> When rebuilding build-native already exists, so don't error when running mkdir.
> 
> Signed-off-by: Ross Burton <ross.burton@...>
> ---
>  meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
b/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
> index 7343662..76c69c4 100644
> --- a/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
> +++ b/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
> @@ -20,7 +20,7 @@ LDFLAGS_prepend_libc-uclibc = " -lpthread "
>  inherit cmake pkgconfig
> 
>  do_configure_prepend() {
> -    mkdir build-native
> +    mkdir --parents build-native
>      cd build-native
>      cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \
>              -DCMAKE_C_COMPILER=${BUILD_CC} \


Please don't apply this patch as it may cause make forkbomb. Removing the folder
seems to work:

do_configure_prepend() {
    rm -rf build-native
    mkdir build-native

Regards,
Diego

Patch

diff --git a/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb b/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
index 7343662..76c69c4 100644
--- a/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
+++ b/meta/recipes-multimedia/musicbrainz/libmusicbrainz_git.bb
@@ -20,7 +20,7 @@  LDFLAGS_prepend_libc-uclibc = " -lpthread "
 inherit cmake pkgconfig
 
 do_configure_prepend() {
-    mkdir build-native
+    mkdir --parents build-native
     cd build-native
     cmake -DCMAKE_C_FLAGS=${BUILD_CFLAGS} \
             -DCMAKE_C_COMPILER=${BUILD_CC} \