apt preferences pin: origin local?

心不动则不痛 提交于 2019-12-05 08:18:27

Using "run" or "now" as the origin should work:

Package: xfce4-power-manager
Pin: release o=now
Pin-priority: 1001

Straight from the man page (man 5 apt_preferences):

       This general-form entry in the APT preferences file applies only to
       groups of packages. For example, the following record assigns a
       high priority to all package versions available from the local
       site.

           Package: *
           Pin: origin ""
           Pin-Priority: 999

I believe this is what you are looking for. I have never used pinning to do this, so I'm not sure if this solves your problem.

Recent versions of apt (tested on Debian 9.8, stretch) support installing local debs, as long as a deb of the same name isn't available from a configured repo, in which case the repo version is preferred. For example, after commenting out the relevant repo from the local apt configuration, this works for me:

    sudo apt install ./packagename_0.0.1_all.deb

apt does need the ./ prefix or full path to find the local file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!