diff mbox

package/ti-gfx: do not forcefully remove source dir on extract

Message ID 1393440003-29380-1-git-send-email-yann.morin.1998@free.fr
State Accepted
Commit 066a464aa14aec1abd38e5cc786efaef36a3c556
Headers show

Commit Message

Yann E. MORIN Feb. 26, 2014, 6:40 p.m. UTC
From: "Yann E. MORIN" <yann.morin.1998@free.fr>

ti-gfx uses custom extract commands, which first and foremost removes
the source dir unconditionally.

Thee side-effect of this is that make will re-extract, re-patch and
probably re-build ti-gfx at each run.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Spenser Gilliland <spenser@gillilanding.com>
---
 package/ti-gfx/ti-gfx.mk | 1 -
 1 file changed, 1 deletion(-)

Comments

Peter Korsgaard Feb. 26, 2014, 8:51 p.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > ti-gfx uses custom extract commands, which first and foremost removes
 > the source dir unconditionally.

 > Thee side-effect of this is that make will re-extract, re-patch and
 > probably re-build ti-gfx at each run.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Spenser Gilliland <spenser@gillilanding.com>

Committed to next, thanks.
Arnout Vandecappelle Feb. 26, 2014, 9:33 p.m. UTC | #2
On 26/02/14 19:40, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> ti-gfx uses custom extract commands, which first and foremost removes
> the source dir unconditionally.
> 
> Thee side-effect of this is that make will re-extract, re-patch and
> probably re-build ti-gfx at each run.

 There actually was a reason for this - I think the extract fails if you
re-run it. Have you tried

make ti-gfx-extract; make ti-gfx-extract

?

 Regards,
 Arnout

> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Spenser Gilliland <spenser@gillilanding.com>
> ---
>  package/ti-gfx/ti-gfx.mk | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/package/ti-gfx/ti-gfx.mk b/package/ti-gfx/ti-gfx.mk
> index 5ea6b92..e48715d 100644
> --- a/package/ti-gfx/ti-gfx.mk
> +++ b/package/ti-gfx/ti-gfx.mk
> @@ -90,7 +90,6 @@ TI_GFX_HDR_DIRS = OGLES2/EGL OGLES2/EWS OGLES2/GLES2 OGLES2/KHR \
>  	OGLES/GLES bufferclass_ti/ pvr2d/ wsegl/
>  
>  define TI_GFX_EXTRACT_CMDS
> -	$(RM) -rf $(TI_GFX_DIR)
>  	chmod +x $(DL_DIR)/$(TI_GFX_SOURCE)
>  	printf "Y\nY\n qY\n\n" | $(DL_DIR)/$(TI_GFX_SOURCE) \
>  		--prefix $(@D) \
>
Peter Korsgaard Feb. 26, 2014, 9:43 p.m. UTC | #3
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 26/02/14 19:40, Yann E. MORIN wrote:
 >> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
 >> 
 >> ti-gfx uses custom extract commands, which first and foremost removes
 >> the source dir unconditionally.
 >> 
 >> Thee side-effect of this is that make will re-extract, re-patch and
 >> probably re-build ti-gfx at each run.

 >  There actually was a reason for this - I think the extract fails if you
 > re-run it. Have you tried

 > make ti-gfx-extract; make ti-gfx-extract

That afaik simply says nothing to do, like it should.
Yann E. MORIN Feb. 26, 2014, 9:48 p.m. UTC | #4
Arnout, All,

On 2014-02-26 22:33 +0100, Arnout Vandecappelle spake thusly:
> On 26/02/14 19:40, Yann E. MORIN wrote:
> > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > 
> > ti-gfx uses custom extract commands, which first and foremost removes
> > the source dir unconditionally.
> > 
> > Thee side-effect of this is that make will re-extract, re-patch and
> > probably re-build ti-gfx at each run.
> 
>  There actually was a reason for this - I think the extract fails if you
> re-run it. Have you tried
> 
> make ti-gfx-extract; make ti-gfx-extract

I shall try that right away... Nope, works!

I eventually understood what was going on. Basically, when you run:

    make ti-gfx-extract

under the hood, it's as you did:

    make ti-gfx-source
    make ti-gfx-extract

But -source creates a stamp file. Then -extract would remove the
directory, thus removing the stamp file.

10 When you run make again, the stamp file for the download is missing, so
make tries to download it again (invisible, since we already have the
archive), creates the stamp file, and extract again, which removes the
stamp file.
20 GOTO 10.

Regards,
Yann E. MORIN.
Arnout Vandecappelle Feb. 26, 2014, 9:50 p.m. UTC | #5
On 26/02/14 22:43, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
> 
>  > On 26/02/14 19:40, Yann E. MORIN wrote:
>  >> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  >> 
>  >> ti-gfx uses custom extract commands, which first and foremost removes
>  >> the source dir unconditionally.
>  >> 
>  >> Thee side-effect of this is that make will re-extract, re-patch and
>  >> probably re-build ti-gfx at each run.
> 
>  >  There actually was a reason for this - I think the extract fails if you
>  > re-run it. Have you tried
> 
>  > make ti-gfx-extract; make ti-gfx-extract
> 
> That afaik simply says nothing to do, like it should.

 I mean if the stamp file is removed.

 But I realize now that this is something that doesn't necessarily work
anyway, so please ignore my comment.

 Regards,
 Arnout
diff mbox

Patch

diff --git a/package/ti-gfx/ti-gfx.mk b/package/ti-gfx/ti-gfx.mk
index 5ea6b92..e48715d 100644
--- a/package/ti-gfx/ti-gfx.mk
+++ b/package/ti-gfx/ti-gfx.mk
@@ -90,7 +90,6 @@  TI_GFX_HDR_DIRS = OGLES2/EGL OGLES2/EWS OGLES2/GLES2 OGLES2/KHR \
 	OGLES/GLES bufferclass_ti/ pvr2d/ wsegl/
 
 define TI_GFX_EXTRACT_CMDS
-	$(RM) -rf $(TI_GFX_DIR)
 	chmod +x $(DL_DIR)/$(TI_GFX_SOURCE)
 	printf "Y\nY\n qY\n\n" | $(DL_DIR)/$(TI_GFX_SOURCE) \
 		--prefix $(@D) \