安装后,我改变了一些想法,宁愿稳定testing这个特定的系统。 不幸的是,我目前在旧的testing版本包。 我需要强制降级,让他们回到挤压轨道,同时保持一个或两个(加上依赖)在testing版本。 可悲的是,我的喜好文件与其他人打得不好。 我在version n= , version a=等方面尝试了很多变体
bash# cat /etc/apt/preferences.d/pinstable Package: * Pin: release a=testing Pin-Priority: -10 Package: * Pin: release a=stable Pin-Priority: 1010
我有默认版本设置为稳定:
bash# cat /etc/apt/preferences.d/apt.conf.d/99release APT::Default-Release "stable";
下面是一个使用包含几个可能版本的随机包的示例:
bash# apt-cache policy libapache2-mod-php5 libapache2-mod-php5: Installed: 5.3.6-13 Candidate: 5.3.6-13 Version table: 5.3.9-1 0 -10 http://mirror.rit.edu/debian/ testing/main i386 Packages *** 5.3.6-13 0 100 /var/lib/dpkg/status 5.3.3-7+squeeze7 0 990 http://security.debian.org/ squeeze/updates/main i386 Packages 5.3.3-7+squeeze3 0 990 http://mirror.rit.edu/debian/ squeeze/main i386 Packages
为什么不是优先1010的挤压版本?
这里的问题是你的/etc/apt/apt.conf.d/99release文件。
从man 5 apt_preferences
If the target release has been specified then APT uses the following algorithm to set the priorities of the versions of a package. Assign: priority 990 to the versions that are not installed and belong to the target release.
看起来,在APT中提到的显式释放将覆盖任何引脚设置。 我设置了一个testing系统,并有一个类似的99release文件,并且pinstable文件与apt-cache中的值完全相同。 但是,如果我99release文件,我得到这个。
# apt-cache policy libapache2-mod-php5 libapache2-mod-php5: Installed: (none) Candidate: 5.3.3-7+squeeze8 Version table: 5.3.3-7+squeeze8 0 1010 http://security.debian.org/ squeeze/updates/main amd64 Packages 5.3.3-7+squeeze3 0 1010 http://ftp.us.debian.org/debian/ squeeze/main amd64 Packages