Patchwork [bitbake-devel] git: do not execute 'git remote prune'

login
register
mail settings
Submitter Enrico Scholz
Date June 30, 2012, 7:34 p.m.
Message ID <1341084896-29686-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/30957/
State Accepted
Commit 2ba23df5fad4b94d38a6aed97f7822226d72eb89
Headers show

Comments

Enrico Scholz - June 30, 2012, 7:34 p.m.
'git remote prune' at this location does not make much sense because
the following 'git remote rm' will prune stale and non-stale branches.

The 'prune' can cause trouble because it will access the network
bypassing the no-network code in bitbake. When this operation fails and
throws an exception, the next command (--> 'git remote rm') will be
skipped.  This in turn, will make all the following operations fail,
because they assume that the remote does not exist yet.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 lib/bb/fetch2/git.py |    1 -
 1 file changed, 1 deletion(-)
Richard Purdie - July 4, 2012, 1:43 p.m.
On Sat, 2012-06-30 at 21:34 +0200, Enrico Scholz wrote:
> 'git remote prune' at this location does not make much sense because
> the following 'git remote rm' will prune stale and non-stale branches.
> 
> The 'prune' can cause trouble because it will access the network
> bypassing the no-network code in bitbake. When this operation fails and
> throws an exception, the next command (--> 'git remote rm') will be
> skipped.  This in turn, will make all the following operations fail,
> because they assume that the remote does not exist yet.
> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  lib/bb/fetch2/git.py |    1 -
>  1 file changed, 1 deletion(-)

Merged to master, thanks.

Richard

Patch

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 8544860..c5ccdfd 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -207,7 +207,6 @@  class Git(FetchMethod):
                 needupdate = True
         if needupdate:
             try: 
-                runfetchcmd("%s remote prune origin" % ud.basecmd, d) 
                 runfetchcmd("%s remote rm origin" % ud.basecmd, d) 
             except bb.fetch2.FetchError:
                 logger.debug(1, "No Origin")