Skip to contentSkip to conversation

bitbake git fetcher fix

RFC In review Otavio Salvador 3 participants 6 messages Jan 6, 2009

lore
Share & tools
lore
#0 lore raw

RFC 1/1 bitbake git fetcher fix

Hello,

I've found a issue when using current GIT fetcher and bellow patch fixes it for me; could someone take a look at it and commit if it does look fine?

Cheers,

bb/fetch/git.py +3 -5
Index: lib/bb/fetch/git.py
===================================================================
@@ -42,19 +42,17 @@
             ud.proto = ud.parm['protocol']
 
         ud.branch = ud.parm.get("branch", "master")
+        ud.tag = None
 
         tag = Fetch.srcrev_internal_helper(ud, d)
         if tag is True:
             ud.tag = self.latest_revision(url, ud, d)	
-        elif tag:
+        elif tag and tag != "1":
             ud.tag = tag
 
-        if not ud.tag:
+        if not ud.tag or ud.tag == "master":
             ud.tag = self.latest_revision(url, ud, d)	
 
-        if ud.tag == "master":
-            ud.tag = self.latest_revision(url, ud, d)
-
         ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
 
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
Signature · 8 lines
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [email protected]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."
#1 lore raw
Quoted 7 lines · Otavio Salvador

Hello,

I've found a issue when using current GIT fetcher and bellow patch fixes it for me; could someone take a look at it and commit if it does look fine?

+ elif tag and tag != "1":

That looks to be a hack for lazy people that don't specify a SRCREV nor set AUTOREV. Such a fetch failure is intended behaviour.

regards,

Koen.

#2 lore raw
Quoted 11 lines · Koen Kooi
Quoted 7 lines · Otavio Salvador

Hello,

I've found a issue when using current GIT fetcher and bellow patch fixes it for me; could someone take a look at it and commit if it does look fine?

+ elif tag and tag != "1":

That looks to be a hack for lazy people that don't specify a SRCREV nor set AUTOREV. Such a fetch failure is intended behaviour.

How about we adopt Poky's slightly more verbose approach of SRCREV ?= "INVALID" in bitbake.conf?

We check for "INVALID" in bitbake and error if we see it.

Cheers,

Richard

#3 lore raw
Quoted 8 lines · Richard Purdie
Quoted 7 lines · Koen Kooi
Quoted 6 lines · Otavio Salvador

Hello,

I've found a issue when using current GIT fetcher and bellow patch fixes it for me; could someone take a look at it and commit if it does look fine?
+ elif tag and tag != "1":

Quoted 7 lines
Quoted 2 lines

That looks to be a hack for lazy people that don't specify a SRCREV nor set AUTOREV. Such a fetch failure is intended behaviour.

How about we adopt Poky's slightly more verbose approach of SRCREV ?= "INVALID" in bitbake.conf?

We check for "INVALID" in bitbake and error if we see it.

I like how it's more "in your face" about it :)

regards,

Koen

#4 lore raw
In reply to Richard Purdie
Quoted 4 lines · Richard Purdie

How about we adopt Poky's slightly more verbose approach of SRCREV ?= "INVALID" in bitbake.conf?

We check for "INVALID" in bitbake and error if we see it.

This would saved my a lot of time ;-)

Signature · 8 lines
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [email protected]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."
#5 lore raw
In reply to Koen Kooi
Quoted 11 lines · Koen Kooi
Quoted 7 lines · Otavio Salvador

Hello,

I've found a issue when using current GIT fetcher and bellow patch fixes it for me; could someone take a look at it and commit if it does look fine?

+ elif tag and tag != "1":

That looks to be a hack for lazy people that don't specify a SRCREV nor set AUTOREV. Such a fetch failure is intended behaviour.

Since I'm this lazy people, could you tell me what I'm suppose to put in SRCREV to use AUTOREV and solve this?

Signature · 8 lines
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [email protected]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."