[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to compare versions



On Wed, Feb 03, 2010 at 01:43:49PM +0900, Hideki Yamane wrote:
>  I'm thinking about tomoyo-ccstools package update but it has a problem.
>  It has no compatibility with current version (1.6.8) and newer version
>  (1.7.1). So, I want users would be able to choice continue upgrading or 
>  not with debconf.
> 
>  I wrote that, but there's a problem - it compares versions in preinst
>  script, so it has "Pre-Depends: debconf". It is recommended to avoid 
>  using Pre-Depends as policy manual says. 
>  # http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
> 
>  So I want to ask how would I do such thing - compare version with current
>  installed version - in smart way, without pre-depends.

In short: you don't.

You should make it clear in the NEWS.Debian file that there are
compatibility issues, and your README.Debian should describe how to perform
an upgrade manually (or point to upstream documentation for same).  Users
who are specifically interested in upgrade compatibility issues should be
keeping an eye on the NEWS.Debian file for all the packages they upgrade
(via apt-listchanges); everyone else is assumed to not be that interested,
and should expect that incompatible upgrades may occur.

That being said, you should try your best to make upgrading smooth,
providing compatibility shims and automatic data conversion (as
appropriate), along with encoraging upstream to take a less cavalier
approach to their users' expectations (a major version bump should be used
for a completely incompatible upgrade).

In the worst possible case, you may want to look at providing both the older
version of the package and the newer one side-by-side, to allow users to
run both in parallel and upgrade at their convenience (major software
packages like apache do this).  It is a lot of work (both to do the
packaging, test the side-by-side operation, and support the old version
through a stable release without upstream help) so it's not something to be
undertaken lightly, but it is another option.

- Matt


Reply to: