[oe] SRCPV migration
Martin Jansa
martin.jansa at gmail.com
Mon Nov 16 13:43:39 UTC 2009
On Mon, Nov 16, 2009 at 12:37:02PM +0000, Richard Purdie wrote:
> On Mon, 2009-11-16 at 13:10 +0100, Koen Kooi wrote:
> I think we will have to hold off some of the SRCPV migration until
> bitbake has some kind of lock down functionality for the local build
> numbers. Any volunteers to write a patch?
This could be enough?
Just putting
BB_GIT_LOCALCOUNT_FOR_SRCREV = "0"
somewhere (local.conf/distro.conf) and _count will always stay on 0
(gitr0+abc1234def)
--
uin:136542059 jid:Martin.Jansa at gmail.com
Jansa Martin sip:jamasip at voip.wengo.fr
JaMa
-------------- next part --------------
>From 9c9cc27acde3d7fe059c8bae79b958180f8247d8 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa at gmail.com>
Date: Mon, 16 Nov 2009 14:36:34 +0100
Subject: [PATCH] Lock down LOCALCOUNT if you need consistent SRCPV between multiple buildhosts
---
lib/bb/fetch/__init__.py | 3 ++-
lib/bb/fetch/git.py | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
index 8c0d7ea..0b9a052 100644
--- a/lib/bb/fetch/__init__.py
+++ b/lib/bb/fetch/__init__.py
@@ -537,6 +537,7 @@ class Fetch(object):
"""
has_want_sortable = hasattr(self, "_want_sortable_revision")
+ has_want_increasing_localcount = hasattr(self, "_want_increasing_localcount")
has_sortable = hasattr(self, "_sortable_revision")
if not has_want_sortable and has_sortable:
@@ -555,7 +556,7 @@ class Fetch(object):
if last_rev == latest_rev:
return str(count + "+" + latest_rev)
- if count is None:
+ if not has_want_increasing_localcount or count is None:
count = "0"
else:
count = str(int(count) + 1)
diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index 5cdf656..e4d0156 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -149,6 +149,9 @@ class Git(Fetch):
def _want_sortable_revision(self, url, ud, d):
return bb.data.getVar("BB_GIT_CLONE_FOR_SRCREV", d, True) or False
+ def _want_increasing_localcount(self, url, ud, d):
+ return bb.data.getVar("BB_GIT_LOCALCOUNT_FOR_SRCREV", d, False) or True
+
def _sortable_revision(self, url, ud, d):
"""
This is only called when _want_sortable_revision called true
--
1.6.5.2
More information about the Openembedded-devel
mailing list