Skip to contentSkip to conversation

bitbake 1.8 badness in using same git for different bb

PATCH John Lee 3 participants 3 messages Sep 1, 2008 – Sep 2, 2008

lore
Share & tools
lore

John Lee

author
#0 lore raw

hi,

in bitbake 1.8 git.py, _revision_key returns ud.host + ud.path, that means if two bb share the same git dir, the _revision_key will be the same. that will cause problem if you use AUTOREV. the local count will keep increasing everytime you call bitbake.

for example, mickeydbus and mickeyterm shared the same dir in the same git repo, and they are both required for fso-image. so everytime I run bitbake fso-image the local counts of them will both increase and I end up with some crazy package names like git24+xxx. for some reason linux-openmoko has the same symptom but I didn't take time to find out. maybe that's because linux-openmoko_2.6.24+git.bb and linux-openmoko-devel_git.bb shared the same git dir as well.

this can be fixed by the attached patch (created by Holger in bitbake-om), but that will reset the local count thus make anyone uses the OM repo stop upgrading these packages.

I wonder if anyone has the same problem as well and how does he/she fixes it.

Regards,
John

bb/fetch/__init__.py +2 -0
Index: lib/bb/fetch/__init__.py
===================================================================
@@ -515,6 +515,8 @@
 
         pd = persist_data.PersistData(d)
         key = self._revision_key(url, ud, d)
+        key = "%s-%s" % (key, bb.data.getVar("PN", d, True) or "")
+
         latest_rev = self._build_revision(url, ud, d)
         last_rev = pd.getValue("BB_URI_LOCALCOUNT", key + "_rev")
         count = pd.getValue("BB_URI_LOCALCOUNT", key + "_count")
#1 lore raw
Quoted 6 lines · John Lee

hi,

in bitbake 1.8 git.py, _revision_key returns ud.host + ud.path, that means if two bb share the same git dir, the _revision_key will be the same. that will cause problem if you use AUTOREV. the local count will keep increasing everytime you call bitbake.

Related to this: You can't do something like:

SRC_URI = "git://ffmpeg;protocol=git \
git://mplayer/swscale;protocol=git"

since both checkouts will use the 'git' dir in ${WORKDIR}.

regards,

Koen

#2 lore raw
In reply to John Lee
Quoted 3 lines · On Monday 01 September 2008 12:50:09 John Lee wrote:

this can be fixed by the attached patch (created by Holger in bitbake-om), but that will reset the local count thus make anyone uses the OM repo stop upgrading these packages.

Which brings us to the second patch that needs some work and then merging.

z.