我们有自己的apt/deb存储库,其中包含一些希望控制版本的包。至关重要的是,这包括木偶,它可以敏感的版本是不同的。
我希望我们的桌面只能从我们的存储库中获得傀儡,但也希望人们能够添加他们自己的PPA,启用backports等等。我们当前的问题是Ubuntu上的backports。/etc/apt/sources.list中的一些重要行:
deb http://gb.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://deb.example.org/apt/ubuntu/lucid/ binary/在/etc/apt/preferences.d/puppet中:
Package: puppet puppet-common
Pin: release a=binary
Pin-Priority: 800
Package: puppet puppet-common
Pin: release a=lucid-backports
Pin-Priority: -10目前的政策是:
$ sudo apt-cache policy puppet
puppet:
Installed: (none)
Candidate: (none)
Package pin: 2.7.1-1ubuntu3.6~lucid1
Version table:
2.7.1-1ubuntu3.6~lucid1 -10
500 http://gb.archive.ubuntu.com/ubuntu/ lucid-backports/main Packages
100 /var/lib/dpkg/status
2.6.14-1puppetlabs1 -10
500 http://deb.example.org/apt/ubuntu/lucid/ binary/ Packages
0.25.4-2ubuntu6.8 -10
500 http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
0.25.4-2ubuntu6 -10
500 http://gb.archive.ubuntu.com/ubuntu/ lucid/main Packages如果我使用n=而不是a=,那么我就得到了Package pin: (not found)
在这一点上,我完全搞不懂我该用什么。任何帮助都很感激。
我花了更多的时间阅读apt/首选项手册页并找到了origin关键字。所以我现在试着:
Explanation: get puppet from our server
Explanation: priority over 1000 means downgrade if necessary
Package: puppet puppet-common
Pin: origin "deb.example.org"
Pin-Priority: 1001我确实删除了后门行。该手册说,优先考虑超过1000将导致降级。但目前还没有安装任何设备。我仍然得到了Package pin: (not found)和Candidate: (not found),同时仍然得到了上面的完整版本表。我不明白为什么我的起源不改变deb.example.org一号的优先级。
发布于 2012-09-25 21:11:48
这个答案显然将取决于您如何在您自己的私人回购中打包和分发包(如傀儡),但需要考虑的另一种选择是将特定于公司的版本设置为前缀,以避免与“主”存储库(如backport)发生冲突。
所以,用abc -木偶代替木偶,因为abc是公司的缩写。
https://serverfault.com/questions/426780
复制相似问题