This module contains functions governing the assignment of version
numbers, patterned after Ubuntu version number policy:
- To distinguish packages which have been pulled out of one vendor's
repository to build for another, we add a vendor name and a build
number, so version 1.2-3 becomes 1.2-3vendorname1. Subsequent
builds (perhaps due to changes in build dependencies) would be numbered
1.2-3vendorname2 and so on.
- In addition, packages which are backported, (i.e. built for a
non-development release such as Debian etch or Ubuntu feisty) need
another tag to distinguish them from the version that would go into
the development release (sid or, as of this writing, heron.) So if
we pulled the source for version 1.2-3vendorname4 out of our pool
to build for feisty, it would become 1.2-3vendorname4~feisty1.
- The first two policies combine if we
are building a package pulled directly from the other vendor into
our feisty pool, then 1.2-3 would become 1.2-3vendorname0~feisty1.
Subsequent builds of 1.2-3 (perhaps due to changes in build
dependencies) would get increasing build numbers,
- If the original version number does not end with a digit, a 0 is
inserted before the vendor name to facilitate parsing of these tags.
- Finally, an additional tag format is supported for the benefit of
one autobuilder client, where before the vendor name an r and an
integer are inserted.
|Parse a Debian revision string (the portion of the version number
following the final dash) into a prefix and a VersionTag.
|The tag returned by splitTag
|The prefix returned by splitTag
|:: String -> String||The release name alias function. As an example, this would map
the repository etch to the tag bpo40+, as specified by Debian policy.
|-> String||The vendor tag
|-> Maybe String||The build release, or Nothing if this is a development release
|-> Maybe Int||Use old r0vendor1 format
|-> Maybe DebianVersion||The newst version that is already present in the dist. We need
to generate a version number newer than this.
|-> [DebianVersion]||All the versions that are currently available in the pool. The
result must not be a member of this list.
|-> DebianVersion||The version number that appears in the newest change log
entry of the source package. The result will be this number
with a version tag added. If this version is older than the
current version with its tag stripped, the package cannot be
|-> Either String DebianVersion||The modified version number
|Modify a version number by adding or changing the vendor tag. The
result will be newer than the distVersion (the newest already
uploaded version.) It will also be different from (though not
necessarily newer than) any of the elements of allVersions
|Append a vendor tag to a string containing the revision portion
of a debian version number.
|Produced by Haddock version 2.4.2|