Versioning Conventions

Introduction

GPT imposes a version numbering convention on packages and bundles so that the updating and compatiblity checking functions works as expected. These version numbers are used internally by GPT and do not have to match the version number of the software being packaged or bundled. GPT also provides a Version_Label field for packages and bundles that can contain the version number of the software as a CDATA string. This field is displayed to the user when queries are done.

Package and Bundle Versions

GPT has adopted a variation of libtool's version numbering scheme for packages and bundles. In libtool's scheme, each version number consists of three fields, major version number, minor version number, and a "compatibility range" number. The major version number is bumped for any interface change, the minor version represents gets bumped for bugfixes, etc in a given interface, and the third number represents the range for which the first number is backwardly compatible. For example, 5.4.3 is backwardly compatible with 2.x.x and up (through 5), since 5-3=2.

The element that contains the version number for the packages and bundles is the Aging_Version element. The Major attribute contains the major number. The Minor attribute contains the minor number. The Age attribute contains the backawards compatibility number.

Version Compatibility Requirements

GPT provides a couple of elements to express version compatibility as a part of a package dependency. The two elements are Simple_Version and Version_Range. Multiple instances of these two elements can be used to create a list of compatibility expressions inside a Version element. The Simple_Version element computes compatibility with the Major, Minor, and Age attributes of an Aging_Version element. The Version_Range uses only the Major and Minor Aging_Version attributes to compute compatibility. It ignores the Age attribute. How this works is best expressed by a number of examples in the following table

Table 10.1. Version Compatibility Examples

Compatiblity RequirementPackage VersionIs CompatibleNotes
Math ExpressionXML EquivelentMath ExpressionXML Equivelent
2.2

<Simple_Version 
Major="2">

2.3.0

<Aging_Version 
Major="2" 
Minor="3" 
Age="0">

YesOnly the Major version number is used to check compatibility.
2

<Simple_Version 
Major="2">

3.2.0

<Aging_Version 
Major="3" 
Minor="2" 
Age="0">

NoMajor version number minus Age is not less than or equal 2.
2

<Simple_Version 
Major="2">

3.2.1

<Aging_Version 
Major="3" 
Minor="2" 
Age="1">

YesMajor version number minus Age is equal to 2.
3.1 exactly

<Version_Range 
Upper_Major="3" Lower_Major="1"
Upper_Minor="3" Lower_Minor="1">

3.2.0

<Aging_Version 
Major="3" 
Minor="2" 
Age="0">

NoMinor version does not fall within the range.
3.1 to 3.3

<Version_Range 
Upper_Major="3" Lower_Major="1"
Upper_Minor="3" Lower_Minor="3">

3.2.0

<Aging_Version 
Major="3" 
Minor="2" 
Age="0">

YesBoth versions does fall within the range.
2.1 to 3.9

<Version_Range 
Upper_Major="2" Lower_Major="1"
Upper_Minor="3" Lower_Minor="9">

3.2.0

<Aging_Version 
Major="3" 
Minor="2" 
Age="0">

YesBoth versions does fall within the range.
2.1 to 3.9

<Version_Range 
Upper_Major="2" Lower_Major="1"
Upper_Minor="3" Lower_Minor="9">

4.2.2

<Aging_Version 
Major="4" 
Minor="2" 
Age="2">

NoMajor version does not fall within the range. Note that the Age is not used to compute compatability for range elements.
2 or 3.5 to 4.2

<Simple_Version 
Major="2">
<Version_Range 
Upper_Major="3" Lower_Major="5"
Upper_Minor="4" Lower_Minor="2">

3.2.0

<Aging_Version 
Major="3" 
Minor="2" 
Age="0">

NoMajor minus Age is not within 2. Versions are not within the range
2 or 3.5 to 4.2

<Simple_Version 
Major="2">
<Version_Range 
Upper_Major="3" Lower_Major="5"
Upper_Minor="4" Lower_Minor="2">

3.2.1

<Aging_Version 
Major="3" 
Minor="2" 
Age="1">

YesMajor minus Age is within 2.
2 or 3.5 to 4.2

<Simple_Version 
Major="2">
<Version_Range 
Upper_Major="3" Lower_Major="5"
Upper_Minor="4" Lower_Minor="2">

3.9.0

<Aging_Version 
Major="3" 
Minor="9" 
Age="0">

YesVersions are within the range

Version Numbers and Filenames

Versions are included in the filenames of however packages and bundles. However, they have different ways of choosing what to use as a filename version number. Bundles will use the contents of the Version_Label if it exists. Otherwise the bundle version is used in the form Major.Minor. Packages always use the Aging_Version element for the filename version. This is because GPT needs to be able to extract the version number from an rpm file because it cannot extract packaging information from the contents of this type of file.