Documentation
¶
Overview ¶
Package pkgrel says whether two readings of a software's release are the same release written with more or less detail: a scan banner's "10.2", an upstream "10.2p1", Alpine's "10.2_p1-r1", Debian's "1:10.2p1-2ubuntu3.8", RPM's "8.7p1-38.el9". A pure function on text a device, a person or a scan sent; a text of another shape is compared as written, never guessed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Distro ¶
Distro is the Linux distribution family an OS name names ("alpine", "ubuntu", "debian", "rhel", "suse"), "" for none (Windows, a network OS such as Junos, an unknown OS). Only a distribution builds packages whose release differs from the upstream version.
func Marked ¶
Marked says a release text carries a distribution's mark in its revision ("2ubuntu3.8", "+deb12u3", ".el9").
func Release ¶
Release says a text is a distribution's package release by its own shape: Alpine's apk ("10.2_p1-r1", also after a package name: "openssh-10.2_p1-r1"), a release with a distribution's mark ("1:10.2p1-2ubuntu3.8", "9.2p1-2+deb12u3", "8.7p1-38.el9"), or a Debian version with an epoch ("1:9.2p1-2"). A vendor's release ("15.1R7.9", "v7.2.13", "9.6") is not one.
func Same ¶
Same reports whether two readings are one release: each reading is its package release when it has one, else its version. "10.2" and "10.2p1" are the same (the shorter one omits the patch level); 10.2 and 9.8, or 10.2 and 10.3, are not. An empty reading is never the same as anything.
func Upstream ¶
Upstream is the upstream version a release text names, lower case: a banner's extra words are dropped ("10.2p1 Ubuntu 2ubuntu3.8" is 10.2p1), an apk release reads as NVD writes it ("10.2_p1-r1" is 10.2p1), and a Debian or RPM release loses its epoch and its distribution revision ("1:9.2p1-2+deb12u3" is 9.2p1, "8.7p1-38.el9" is 8.7p1).
Types ¶
This section is empty.