[oe] Hash based SCMs and OpenEmbedded/Bitbake

Phil Blundell pb at reciva.com
Thu Sep 4 11:43:23 UTC 2008


On Wed, 2008-09-03 at 15:54 +0200, Holger Freyther wrote:
> we have a couple of issues with hash based SCMs (like git) and how we handle 
> them.

It's kind of tempting to say that you should just lean on your upstream
to make proper releases and use them, rather than trying to pull some
random bag of bits out of the SCM repository.  However, I guess this was
not the sort of advice you were looking for. :-}

Perhaps more constructively, my preference would be to use "git log" or
some such to extract the datestamp of the revision in question, and then
glue it into PV to make a version string that was sortable and hence
upgradeable.  So, if you had git revision
5a5346dfbec459c10d9e61e16e125b83975a1ef1 or whatever, you'd end up with
PV = "1.0.0+git20080904T123500
+5a5346dfbec459c10d9e61e16e125b83975a1ef1".  Obviously you still have
the possibility of losing if you want to upgrade from one revision to
another one committed in the same second, but I imagine this does not
arise often in practice.

If you don't like that idea then I would suggest the simpler approach of
a manually-maintained version number that you simply prepend to the SCM
revision identifier.  When you change from one SCM revision to another,
you would be responsible for incrementing this number.  This doesn't
seem like an unreasonable thing to require when using a SCM that doesn't
provide its own global versioning, and it's probably the only way of
making multiple branches work out right.

p.





More information about the Openembedded-devel mailing list