阿普别针和自己托pipe回购

我们有我们自己的apt / deb版本库以及一些我们想要控制版本的软件包。 至关重要的是这包括傀儡,它可以是对版本不同的敏感。

我希望我们的桌面只能从我们的存储库中获取木偶,但也可以让人们添加自己的PPA,启用后端插件等。目前的问题是Ubuntu Lucid上的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 / preferences手册页并find了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 

我没有删除backports行。 手册页说1000以上的优先级将导致降级。 但是,因为它没有安装任何东西。 我仍然得到Package pin: (not found)Candidate: (not found)同时仍然得到上面的完整版本表。 我不明白为什么我的出处不会改变deb.example.org的优先级。

这个答案显然取决于你在自己的私人回购中如何打包和分发包,例如puppet,但是另一种select是考虑使公司特定的版本具有前缀名,以避免与“主”存储库冲突,例如backports 。

所以,而不是傀儡,使用abc傀儡abc是你的公司的简写。