SRCREV and git packages

Werner Almesberger werner at openmoko.org
Wed Jun 4 16:13:41 CEST 2008


Holger Freyther wrote:
> To be able to upgrade you need to have increasing version numbers. With 
> subversion this is trivial, with a hash (as provided by git) this not 
> trivial. A more recent kernel might have a hash that is smaller than the 
> month old one.

Yup, I understand that. But, assuming you've already installed package
foo, version X, then the question in your example is "is there a more
recent version of foo than version X".

Now, since you've already built foo, you had access to the whole
repository at some point in the past, so you could have recorded the
then-latest hash.

If we make the additional assumption that upstream changes generally
mean that there's a newer version, you could determine if there's
something new to do simply by comparing the now-latest hash (at
upstream) with the one you've recorded when you built the package.

So all you'd really need is to keep track not only of the
monotonously increasing version number but also of the hash it
corresponds to.

Does this make sense ?

By the way, in this simple example you don't actually even need the
monotonous version number. That would only come into play when adding
constraints like "requires libblah >= version 5". (Which I've
discussed in my previous mail.)

- Werner



More information about the distro-devel mailing list