debian-3.33: Modules for working with the Debian package systemSource codeContentsIndex

This module contains functions governing the assignment of version numbers, patterned after Ubuntu version number policy:

  1. 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.
  2. 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.
  3. 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, 1.2-3vendorname0~feisty2 etc.
  4. 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.
  5. 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.
data VersionTag
parseTag :: String -> DebianVersion -> (DebianVersion, Maybe VersionTag)
getTag :: String -> DebianVersion -> Maybe VersionTag
dropTag :: String -> DebianVersion -> DebianVersion
setTag :: (String -> String) -> String -> Maybe String -> Maybe Int -> Maybe DebianVersion -> [DebianVersion] -> DebianVersion -> Either String DebianVersion
appendTag :: (String -> String) -> DebianVersion -> Maybe VersionTag -> DebianVersion
tagMax :: [Maybe VersionTag] -> Maybe VersionTag
data VersionTag Source
We implement two types of version number tags. One has the format rreleasenumber>vendor<buildnumber>~release<buildnumber the other simply vendorbuildnumber>~release<buildnumber There are notes from a meeting that explains why ReleaseTagBuild is more future friendly, but it is also more ugly.
show/hide Instances
parseTag :: String -> DebianVersion -> (DebianVersion, Maybe VersionTag)Source
Parse a Debian revision string (the portion of the version number following the final dash) into a prefix and a VersionTag.
getTag :: String -> DebianVersion -> Maybe VersionTagSource
The tag returned by splitTag
dropTag :: String -> DebianVersion -> DebianVersionSource
The prefix returned by splitTag
:: String -> StringThe release name alias function. As an example, this would map the repository etch to the tag bpo40+, as specified by Debian policy.
-> StringThe vendor tag
-> Maybe StringThe build release, or Nothing if this is a development release
-> Maybe IntUse old r0vendor1 format
-> Maybe DebianVersionThe 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.
-> DebianVersionThe 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 built.
-> Either String DebianVersionThe 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
appendTag :: (String -> String) -> DebianVersion -> Maybe VersionTag -> DebianVersionSource
Append a vendor tag to a string containing the revision portion of a debian version number.
tagMax :: [Maybe VersionTag] -> Maybe VersionTagSource
Produced by Haddock version 2.4.2