假设我有以下情况apt-cache policy skypeforlinux
:
skypeforlinux: Installed: 8.11.0.4 Candidate: 8.13.0.2 Version table: 8.13.0.2 0 500 https://repo.skype.com/deb/ stable/main amd64 Packages *** 8.11.0.4 0 500 https://repo.skype.com/deb/ stable/main amd64 Packages 100 /var/lib/dpkg/status 8.10.0.4 0 500 https://repo.skype.com/deb/ stable/main amd64 Packages 8.9.0.1 0 500 https://repo.skype.com/deb/ stable/main amd64 Packages 5.5.0.1 0 500 https://repo.skype.com/deb/ stable/main amd64 Packages
但是,现在我想跳过版本 8.13.0.2,因为我知道它有问题。因此,遵循周围发现的一些建议(包括跳过包的某个版本),我创建/etc/apt/preferenced.d/skype.pref
并输入:
Package: skypeforlinux Pin: version 8.13.0.2 Pin-Priority: -1
*
(请注意,如果我在版本号中 添加尾随,我不会看到任何行为差异)。
这是现在的输出apt-cache policy skypeforlinux
:
skypeforlinux: Installed: 8.11.0.4 Candidate: 8.11.0.4 Package-Pin: 8.13.0.2 Version table: 8.13.0.2 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages *** 8.11.0.4 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 100 /var/lib/dpkg/status 8.10.0.4 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 8.9.0.1 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 5.5.0.1 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages
让我困惑的是,-1 优先级被分配给所有版本。现在的效果是版本 8.13.0.2 不建议升级,但如果我稍微更改我的 skype.pref 以便我 PIN,例如版本 8.9.0.1,我仍然得到:
skypeforlinux: Installed: 8.11.0.4 Candidate: 8.11.0.4 Package-Pin: 8.9.0.1 Version table: 8.13.0.2 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages *** 8.11.0.4 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 100 /var/lib/dpkg/status 8.10.0.4 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 8.9.0.1 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages 5.5.0.1 -1 500 https://repo.skype.com/deb/ stable/main amd64 Packages
8.13.0.2版本不建议升级(候选版本仍然是8.11.0.4,即已安装的版本)。所以,看起来无论我写什么版本skype.pref
,这个包的所有版本都被分配优先级-1,而我希望它只分配给有问题的版本8.13.0.2。
我使用的是Linux Mint 17.3(基于Ubuntu 14.04),apt-get
版本1.0.1ubuntu2(由包版本1.0.1ubuntu2.17带来apt
)。
/etc/preferences
是空的。我/etc/preferences.d
有以下文件:
# getdeb.pref
Package: *
Pin: origin archive.getdeb.net
Pin-Priority: 250
# official-package-repositories.pref
Package: *
Pin: origin live.linuxmint.com
Pin-Priority: 750
Package: *
Pin: release o=linuxmint,c=upstream
Pin-Priority: 700
Package: *
Pin: release o=Ubuntu
Pin-Priority: 500
# official-extra-repositories.pref
Package: *
Pin: origin build.linuxmint.com
Pin-Priority: 700
怎么了?