I'm trying to get the version number of an already installed package, in order to build a dependencies list for a dpkg.
我正在尝试获取已安装软件包的版本号,以便为dpkg构建依赖项列表。
If I type "dpkg -l | grep libqtcore4" into my terminal I get the following result:
如果我在我的终端输入“dpkg -l | grep libqtcore4”,我会得到以下结果:
ii libqtgui4 4:4.7.4-0ubuntu8 Qt 4 GUI module
ii libqtgui4:i386 4:4.7.4-0ubuntu8 Qt 4 GUI module
My question is; what on earth does the colon (:) mean in the version number, and what does the -0ubuntu mean on the end?
我的问题是;冒号(:)在版本号中是什么意思,-0ubuntu最终意味着什么?
2 个解决方案
#1
32
The number before the :
is the epoch. This overrides the version for ordering purposes, e.g. 3:3.1 is considered newer than 2:3.2. It's used when a packager needs to downgrade a package in the repos for one of various reasons.
:之前的数字是时代。这将覆盖版本以用于订购目的,例如3:3.1被认为比2:3.2更新。当包装商因各种原因需要降低回购包中的包时使用它。
The number (value, really) after the -
is the release. It differentiates between different releases of a package that have the same version. It's used for e.g. security patches to an existing version of the software.
- 之后的数字(值,真的)是释放。它区分具有相同版本的软件包的不同版本。它用于例如现有版本软件的安全补丁。
#2
0
Debian policy manual
Debian政策手册
Both of these are covered in: https://www.debian.org/doc/debian-policy/#version
这些都包括在:https://www.debian.org/doc/debian-policy/#version
The format is: [epoch:]upstream_version[-debian_revision].
格式为:[epoch:] upstream_version [-debian_revision]。
epoch
is explained at:
时代解释如下:
epoch
时代
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.
它被允许留下包的旧版本的版本号以及包的先前版本编号方案中的错误。
also asked at: https://askubuntu.com/questions/441879/why-do-some-packages-have-extra-numbers-on-the-front-of-their-version-string
还问:https://askubuntu.com/questions/441879/why-do-some-packages-have-extra-numbers-on-the-front-of-their-version-string
And debian_revision
:
和debian_revision:
debian_revision
debian_revision
This part of the version number specifies the version of the Debian package based on the upstream version
这部分版本号指定了基于上游版本的Debian软件包的版本
The debian revision is needed because Debian due to changes on the build scripts / patches that the Debian package itself uses on top of the software's source itself.
debian修订是必需的,因为Debian由于Debian软件包本身在软件源本身之上使用的构建脚本/补丁的更改。
-ubuntuY
-ubuntuY
Ubuntu can also add an -ubuntuY
suffix to account for changes made on the Ubuntu packaging over the Debian packaging.
Ubuntu还可以添加-ubuntuY后缀来解释在Debian包装上对Ubuntu包装所做的更改。
So for example, 4:4.7.4-0ubuntu8
means that this is the 8th version of the Ubuntu package for the 4:4.7.4
Debian package.
例如,4:4.7.4-0ubuntu8意味着这是4:4.7.4 Debian软件包的Ubuntu软件包的第8个版本。
The 0
there just acts as a placeholder when the Debian package does not have a number, since the debian_revision
is optional.
当Debian软件包没有数字时,0只是一个占位符,因为debian_revision是可选的。
More details at: https://serverfault.com/questions/604541/debian-packages-version-convention/708569#708569
更多详情请访问:https://serverfault.com/questions/604541/debian-packages-version-convention/708569#708569
#1
32
The number before the :
is the epoch. This overrides the version for ordering purposes, e.g. 3:3.1 is considered newer than 2:3.2. It's used when a packager needs to downgrade a package in the repos for one of various reasons.
:之前的数字是时代。这将覆盖版本以用于订购目的,例如3:3.1被认为比2:3.2更新。当包装商因各种原因需要降低回购包中的包时使用它。
The number (value, really) after the -
is the release. It differentiates between different releases of a package that have the same version. It's used for e.g. security patches to an existing version of the software.
- 之后的数字(值,真的)是释放。它区分具有相同版本的软件包的不同版本。它用于例如现有版本软件的安全补丁。
#2
0
Debian policy manual
Debian政策手册
Both of these are covered in: https://www.debian.org/doc/debian-policy/#version
这些都包括在:https://www.debian.org/doc/debian-policy/#version
The format is: [epoch:]upstream_version[-debian_revision].
格式为:[epoch:] upstream_version [-debian_revision]。
epoch
is explained at:
时代解释如下:
epoch
时代
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.
它被允许留下包的旧版本的版本号以及包的先前版本编号方案中的错误。
also asked at: https://askubuntu.com/questions/441879/why-do-some-packages-have-extra-numbers-on-the-front-of-their-version-string
还问:https://askubuntu.com/questions/441879/why-do-some-packages-have-extra-numbers-on-the-front-of-their-version-string
And debian_revision
:
和debian_revision:
debian_revision
debian_revision
This part of the version number specifies the version of the Debian package based on the upstream version
这部分版本号指定了基于上游版本的Debian软件包的版本
The debian revision is needed because Debian due to changes on the build scripts / patches that the Debian package itself uses on top of the software's source itself.
debian修订是必需的,因为Debian由于Debian软件包本身在软件源本身之上使用的构建脚本/补丁的更改。
-ubuntuY
-ubuntuY
Ubuntu can also add an -ubuntuY
suffix to account for changes made on the Ubuntu packaging over the Debian packaging.
Ubuntu还可以添加-ubuntuY后缀来解释在Debian包装上对Ubuntu包装所做的更改。
So for example, 4:4.7.4-0ubuntu8
means that this is the 8th version of the Ubuntu package for the 4:4.7.4
Debian package.
例如,4:4.7.4-0ubuntu8意味着这是4:4.7.4 Debian软件包的Ubuntu软件包的第8个版本。
The 0
there just acts as a placeholder when the Debian package does not have a number, since the debian_revision
is optional.
当Debian软件包没有数字时,0只是一个占位符,因为debian_revision是可选的。
More details at: https://serverfault.com/questions/604541/debian-packages-version-convention/708569#708569
更多详情请访问:https://serverfault.com/questions/604541/debian-packages-version-convention/708569#708569