A few more thoughts: I wrote: > Q: As above, but we want any version for which A <= sequence N <= B. > > Assuming that version A exists at the time the package description is > made, the package description maker could include a hint in the > description that informs what hash corresponds to sequence A.
This may actually not be a good example. If we want to talk about ranges of versions, we might as well use the hash instead of the sequential number, so no hint is needed. However, in real life, one would probably want to refer to a symbolic name, such as "version 2.1". Mapping this to a revision in the SCM is a different kind of problem, which isn't unique to git. > Q: As above, but we want the _latest_ verison which A <= sequence N <= B. > > I think this is the point where we need a full dictionary. That is, if we _predict_ B. Given that SCM revisions number are in general not very predictable, this may not be a relevant scenario either. If version B exists at the time the package is made, this can be treated just like the previous example. To take this one step further, if I got my examples right and there aren't any vastly different queries I've overlooked, it seems that everything can be quite adequately expressed just with hashes inside the bitbake world. I realize that recording the additional information needed to handle hashes efficiently, and expressing the queries in the appropriate way may not be trivial. But I think enabling OE to treat git repositories as "natively" as possible is probably something you'd want to consider anyway. You'd still need sequential numbers when making packages, so that opkg or similar can tell what's old and what's new, but since you have access to the repository at that time, that's easy to do. Going back to the current scenario with sequential numbers generated from git-rev-list, there's one issue that was raised that isn't clear to me: why would one have to download repositories for packages that are not used at all ? Would this just be a side-effect of how generation of the sequential numbers is implemented, or are there real-life cases where one has to know the sequential number of a package that's of no further interest ? - Werner

