几天前我注意到这些年来我一直使用 apt 非常非常错误。我的意图一直是坚持我正在使用的版本,即 debian 测试,因此如果安装了新软件包,它将从测试默认情况下回购。如果必须从 stable 或 stable 中安装软件包,则需要通过显式安装
apt-get install package/<stable|unstable>
事实证明我没有,现在仍然没有完全理解包裹固定的想法。从文档中我了解到固定只是控制从何处获取包的更新;例如,如果不稳定的版本中存在某个软件包的更大版本,是否应该将其拉出。实际上,如果安装了新软件包并且不稳定包含它的最新版本,它从那里获取。这显然不是我想要的。
应该如何配置 apt,以便默认情况下所有软件包仍会从我们的版本存储库中提取?
我的配置内容:
/etc/apt/apt.conf:
APT::Default-Release "testing";
/etc/apt/sources.list:
# stable:
deb http://ftp.uk.debian.org/debian/ stable main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ stable main non-free contrib
# unstable:
deb http://ftp.uk.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ unstable main non-free contrib
# testing
deb http://ftp.uk.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ testing main non-free contrib
# testing/updates
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free
# jessie-updates, previously known as 'volatile'
deb http://ftp.uk.debian.org/debian/ testing-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ testing-updates main contrib non-free
# jessie-backports, previously on backports.debian.org
# do NOT use backports if on testing; testing doesnt have those:
#deb http://ftp.uk.debian.org/debian/ jessie-backports main contrib non-free
#deb-src http://ftp.uk.debian.org/debian/ jessie-backports main contrib non-free
# archive (for old fonts for instance):
#deb http://archive.debian.org/debian-archive/debian woody main
# 3rd party:
....
/etc/apt/首选项:
Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000
Package: *
Pin: release a=testing
Pin-Priority: 995
Package: *
Pin: release a=stable
Pin-Priority: 650
Package: *
Pin: release a=unstable
Pin-Priority: 50
Package: *
Pin: release a=oldstable
Pin-Priority: 1