[RFC] fetch2: introduce BB_GENERATE_MIRROR_VERSIONED_TARBALLS to enable classic versioned scm snapshots

Submitted by Koen Kooi on Sept. 22, 2011, 8:58 a.m.

Details

Message ID 1316681904-10860-1-git-send-email-koen@dominion.thruhere.net
State New, archived
Headers show

Commit Message

Koen Kooi Sept. 22, 2011, 8:58 a.m.
When enabled fetch2 will generate tarballs with the SRCREV embbeded like so:

	git2_git.pingu.fi.xf86-video-omapfb_28c006c94e57ea71df11ec4fff79d7ffcfc4860f.tar.gz

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index fb6125c..f889562 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -93,7 +93,7 @@  class Git(FetchMethod):
 
         ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
 
-        ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
+        ud.rebaseable = ud.parm.get("rebaseable","0") == "1" or ((data.getVar("BB_GENERATE_MIRROR_VERSIONED_TARBALLS", d, True) or "0") != "0")
 
         branches = ud.parm.get("branch", "master").split(',')
         if len(branches) != len(ud.names):

Comments

Koen Kooi Sept. 22, 2011, 6:11 p.m.
Op 22 sep. 2011, om 10:58 heeft Koen Kooi het volgende geschreven:

> When enabled fetch2 will generate tarballs with the SRCREV embbeded like so:
> 
> 	git2_git.pingu.fi.xf86-video-omapfb_28c006c94e57ea71df11ec4fff79d7ffcfc4860f.tar.gz
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> lib/bb/fetch2/git.py |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
> index fb6125c..f889562 100644
> --- a/lib/bb/fetch2/git.py
> +++ b/lib/bb/fetch2/git.py
> @@ -93,7 +93,7 @@ class Git(FetchMethod):
> 
>         ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
> 
> -        ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
> +        ud.rebaseable = ud.parm.get("rebaseable","0") == "1" or ((data.getVar("BB_GENERATE_MIRROR_VERSIONED_TARBALLS", d, True) or "0") != "0")

Apart from the objections raised by Richard I've found 2 other problems with it:

1) it will force a cache invalidation each build
2) fetch2 witll *always* try to access the remote git repo, even if the SRCREV is already present in the local copy

Those aren't really bugs in my patch, but in the rebasable fetch2 code.