为什么有些软件包在版本字符串前面的冒号之前有额外的数字?
我刚刚注意到Wine(以及许多其他软件包)已将其版本控制方案转换为:
1:1.6.2-0ubuntu3
我理解1:
之后的一切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中的以下解释段落- 控制文件及其字段 :
当比较两个版本号时,首先比较每个版本的纪元 ,然后如果epoch相等则则为 upstream_version ,然后如果upstream_version也相等则为debian_revision 。 时代在数字上进行了比较。
和:
请注意,时代的目的是允许我们在版本编号中留下错误,并应对版本编号方案更改的情况。 它不打算处理包含管理系统无法解释的字母串的版本号(例如
ALPHA
或pre-
),或者使用愚蠢的排序。
这是时代。 它会覆盖该版本以确定哪两个包更新:
从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.
资源