问题描述
我刚刚注意到,Wine(和许多其他软件包)已将其版本控制方案更改为:
1:1.6.2-0ubuntu3
我了解1:
之后的所有内容…但是1:
指的是什么?
它似乎没有反映主要版本。查看待升级的列表,有类似2:4.1.3...
的版本,并且有很多没有#:
前缀的软件包。
这是怎么回事?
最佳回答
从man deb-version
:
NAME deb-version - Debian package version number format SYNOPSIS [epoch:]upstream-version[-debian-revision] DESCRIPTION Version numbers as used for Debian binary and source packages consist of three components. These are: epoch This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is omitted then the upstream-version may not contain any colons. It is provided to allow mistakes in the version numbers of older versions of a package, and also a package's previous version numbering schemes, to be left behind.
因此,该额外数字(在您的情况下为1
)是指纪元分量,在这种情况下,假定为0,则可以省略。因此,如果您看到一个类似1.6.2-0ubuntu3
的版本字符串,您可以认为实际上它看起来像是0:1.6.2-0ubuntu3
。这有什么用处以及它是如何实现的:提供该功能是为了保留包的旧版本的版本号以及包的先前版本编号方案中的错误。为了更好地理解,请仔细看一下Debian Policy Manual – Control files and their fields的以下解释性段落:
When comparing two version numbers, first the epoch of each are compared, then the upstream_version if epoch is equal, and then debian_revision if upstream_version is also equal. epoch is compared numerically.
和:
Note that the purpose of epochs is to allow us to leave behind mistakes in version numbering, and to cope with situations where the version numbering scheme changes. It is not intended to cope with version numbers containing strings of letters which the package management system cannot interpret (such as
ALPHA
orpre-
), or with silly orderings.
次佳回答
这是时代。在确定两个软件包中哪个较新时,它将覆盖版本:
在deb-version
手册页中:
epoch This is a single (generally small) unsigned integer. It may be
omitted, in which case zero is assumed. If it is omitted then
the upstream-version may not contain any colons.
It is provided to allow mistakes in the version numbers of older
versions of a package, and also a package's previous version
numbering schemes, to be left behind.