DESCRIPTIONThe Debbugs::Versions module provides generic support functions for the implementation of version tracking in debbugs.
Complex organizations, such as Debian, require the tracking of bugs in multiple versions of packages. The versioning scheme is frequently branched: for example, a security update announced by an upstream developer will be packaged as-is for the unstable distribution while a minimal backport is made to the stable distribution. In order to report properly on the bugs open in each distribution, debbugs must be aware of the structure of the version tree for each package.
Gathering the version data is beyond the scope of this module: in the case of Debian it is carried out by mechanical analysis of package changelogs. Debbugs::Versions takes version data for a package generated by this or any other means, merges it into a tree structure, and allows the user to perform queries based on supplied data about the versions in which bugs have been found and the versions in which they have been fixed.
DATA FORMATThe data format looks like this (backslashes are not actually there, and indicate continuation lines):
1.5.4 1.5.0 1.5-iwj.0.4 1.5-iwj.0.3 1.5-iwj.0.2 1.5-iwj.0.1 1.4.0 1.3.14 \ 1.3.13 1.3.12 1.3.11 1.3.10 ... 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 1.4.1 126.96.36.199 188.8.131.52 \ 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124.0.1 126.96.36.199 188.8.131.52 184.108.40.206 \ 220.127.116.11.2 18.104.22.168.1 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 \ 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 \ 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.199 \ 188.8.131.52 184.108.40.206 220.127.116.11 1.4.0 \ 18.104.22.168 22.214.171.124 126.96.36.199 188.8.131.52 184.108.40.206
- Constructs a Debbugs::Versions object. The argument is a reference to a version comparison function, which must be usable by Perl's built-in "sort" function.
Takes two arguments, "ancestor" and "descendant". Returns true if and only
if "ancestor" is a version on which "descendant" is based according to the
version data supplied to this object. (As a degenerate case, this relation
is reflexive: a version is considered to be an ancestor of itself.)
This method is expected mainly to be used internally by the "merge" method.
Find the leaves of the version tree, i.e. those versions with no
This method is mainly for internal use.
- Merges one branch of version data into this object. This branch takes the form of a list of versions, each of which is to be considered as based on the next in the list.
- Loads version data from the filehandle passed as the argument. Each line of input is expected to represent one branch, with versions separated by whitespace.
- Outputs the version tree represented by this object to the filehandle passed as the argument. The format is the same as that expected by the "load" method.
Takes three arguments, "version", "found", and "fixed". Returns true if
and only if "version" is based on or equal to a version in the list
referenced by "found", and not based on or equal to one referenced by
"buggy" attempts to cope with found and fixed versions not in the version tree by simply checking whether any fixed versions are recorded in the event that nothing is known about any of the found versions.
Takes two arguments, "found" and "fixed", which are interpreted as in
``buggy''. Efficiently returns the state of the bug at every known version,
in the form of a hash from versions to states (as returned by ``buggy''). If
you pass a third argument, "interested", this method will stop after
determining the state of the bug at all the versions listed therein.
Whether this is faster than calling ``buggy'' for each version you're interested in is not altogether clear, and depends rather strongly on the number of known and interested versions.