Comment 1 for bug 559074

Revision history for this message
Anders Kaseorg (andersk) wrote :

My thoughts on this topic, copied from https://answers.launchpad.net/launchpad/+question/105396 :

Note that Debian versions sort roughly as follows:
~ < empty string < number < uppercase < lowercase < + < - < . < _
See dpkg --compare-versions in dpkg(1) if you want to test comparisons yourself.

The difference between -XubuntuY~ppa1 and -XubuntuYppa1 is important, not just conventional, because -XubuntuY~ppa1 is defined as earlier than the corresponding official package -XubuntuY, while -XubuntuYppa1 is later.

The difference between -Xppa1 and -X+ppa1 is also important, because -Xppa1 is less than the next official package Xubuntu1 (*), while -X+ppa1 is later. The difference between -XubuntuYppa1 and -XubuntuY+ppa1 is less important, but it is better to be consistent whether you’re patching -X packages or -XubuntuY packages.

It’s not a good idea to go up to -XubuntuZ~ppa1 where Z = Y+1, either, because the next official Ubuntu package might be a stable release update, in which case it would be -XubuntuY.1 instead of -XubuntuZ.

Therefore, I recommend as a general rule to add ~ppa1 when you are backporting an official package from a later distribution, so that the official package will supersede your package, and add ppa1 with no delimeter when you are adding patches on top of an official package, so that your package will supersede the official package but the next official package will supersede yours.

(* This relies on the happy accident that p comes before u. If you don’t wish to rely on this accident, you could use -Xubuntu0ppa1, but I still recommend avoiding + to help others avoid falling into the -X+ppa1 trap.)