generated version numbers could do with some work

Bug #178573 reported by James Henstridge
Affects Status Importance Assigned to Milestone
Fix Committed

Bug Description

The version numbers generated by autoppa have a few problems:

1. they compare less than any normal version number. e.g.
    >>> import apt_pkg
    >>> apt_pkg.InitSystem()
    >>> apt_pkg.VersionCompare('0.52-gutsy1-landscape1', '0.52-1')

This means you can't produce an autoppa package for the same upstream version as has been shipped in a target distribution release.

2. when comparing version numbers depend on Ubuntu release code names maintaining lexical order. This has not been true in the past, and may not hold in the future:
    >>> apt_pkg.VersionCompare('0.52-gutsy1-landscape1', '0.52-warty1-landscape1')

We have perfectly good version numbers that are guaranteed to always increase, so they'd make a better choice.

I'd suggest that autoppa rewrite a version number like "X.Y-Z" to either "X.Y-Z-7.10" or "X.Y-Z-ubuntu7.10" for the gutsy release and similar for other releases.

So if the base distribution includes a package "2.0.6-1ubuntu1", I'd pass "2.0.6-1ubuntu2~jh1" or "2.0.7-0jh1" to autoppa (depending on whether it was a new 2.0.6 package or a 2.0.7 package), and it would generate version numbers like "2.0.6-1ubuntu2~jh1-7.10" or "2.0.7-0jh1-7.10". These packages compare less than "2.0.6-1ubuntu2" and "2.0.7-1" respectively, so don't cause upgrade problems.

Related branches

Jamu Kakar (jkakar)
Changed in autoppa:
assignee: nobody → jkakar
importance: Undecided → Medium
status: New → Confirmed
Jamu Kakar (jkakar)
Changed in autoppa:
assignee: jkakar → nobody
Revision history for this message
Jamu Kakar (jkakar) wrote :

Merged to autoppa/trunk r12 [r=jkakar].

Changed in autoppa:
assignee: nobody → radix
status: Confirmed → Fix Committed
Changed in autoppa:
assignee: Christopher Armstrong (radix) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.