SRCREV and git packages
zecke at openmoko.org
Tue May 13 01:37:47 CEST 2008
On Monday 12 May 2008 06:24:15 John Lee wrote:
> On Sun, May 11, 2008 at 08:20:56PM +0200, Holger Freyther wrote:
> > Hey,
> > we, as in Openmoko, have preferred SRCDATE for git based recipes over
> > SRCREV for one simple reason. We need an increasing number for the
> > package version and for git we made a number up and stored it within the
> > tmp directory. Removing the tmp directory removed that numbers and we had
> > new packages going back.
> > To partially avoid this issue. Get the latest Bitbake from the
> > bitbake-1.8 branch and put something like this  into your local.conf.
> > This will put the persistent data into your home directory and you can
> > wipe the tmp dir without losing this. Another approach is coming soon as
> > well.
> Actually I use SRCDATE in openmoko-linux because I want a increasing
> number even across different repositories. The persistent data is
> specific to the build machine so I decided not to use that.
Okay, I came up with the below patch and would like to put it into the Bitbake
repository. Let me give a small explanation:
John is right about SRCREV for git packages. Back in the more early days Henry
came up with the idea of using git-rev-list | wc -l to get a increasing
revision number. With git you need a local repository to execute
git-rev-list, I had a brief look at the source and it might be tricky to add
that for all supported fetching methods. So this is bringing us to this
You will need a local repository. This means the current fetcher code may not
download tarballs of checkouts.
You will need a local repository for every piece of git software we use, even
if you don't use it at all. E.g. three disjunct kernel trees wasting some
This assumes that only fast-forwards are applied on the branch you track. If
that is not the case you will have to play with PE when this happens (e.g.
you forced it with using a local git repository and added changed and
upstream then only got one patch... but your package is in the wild..)
So my patch is doing the following:
- Add an option to enable the git-rev-list | wc -l behaviour
- Disable downloading of checkouts as a repository is needed.. This isn't too
bady because the repo is not much bigger than a checkout and we can mirror
the repos as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2839 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/distro-devel/attachments/20080513/27496cb1/bitbake-git-sortable-rev.bin
More information about the distro-devel