git-commit variable comparison

Asked by Didier Mauguy

Hi,

I want to know how git-commit variable is compared during package upload.

Because in freecad-daily PPA the upload failed :
https://launchpadlibrarian.net/205449742/upload_915139_log.txt

However commit gitdd2b39d is older than git74c912f.

And if this is the normal behavior, how to fix the PPA ?

Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

Package versions are compared using the following rules:

  https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

It really doesn't make sense to put git commit hashes in version fields, because they aren't monotonically increasing. I would suggest putting the date (and some part of the time if necessary) of the last commit in the version instead, or perhaps counting commits since the last tag in the kind of way git-describe does.

Revision history for this message
Didier Mauguy (dmauguy-deactivatedaccount) said :
#2

Thank you for your answer.

In fact git commit hash was put in version field to easier make link between build and git commit. Maybe revno will be better ?

How can we revert the PPA to before the naming change occurs ? And what about users who have already installed a package with git commit hash ?

Revision history for this message
Best Colin Watson (cjwatson) said :
#3

You can make the link some other way, for example in the changelog. To recover, you'll have to increment the version to something that compares newer than the existing version in some way that makes sense to you; you can use dpkg --compare-versions locally to test this.

Revision history for this message
Didier Mauguy (dmauguy-deactivatedaccount) said :
#5

Thanks Colin Watson, that solved my question.