generated version numbers could do with some work

Bug #178573 reported by James Henstridge on 2007-12-25
2
Affects Status Importance Assigned to Milestone
AutoPPA
Medium
Unassigned

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')
    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')
    -16

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) on 2008-01-02
Changed in autoppa:
assignee: nobody → jkakar
importance: Undecided → Medium
status: New → Confirmed
Jamu Kakar (jkakar) on 2008-01-15
Changed in autoppa:
assignee: jkakar → nobody
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  Edit
Everyone can see this information.

Other bug subscribers