Package: apt Version: 0.9.7.9+deb7u6 Severity: wishlist Dear Maintainer,
With "apt-get install -t", a package and all its dependencies are installed from the given release. There seems to be no way to achieve the same behavior with apt preferences. While it's possible to specify a glob or regexp for package names in apt preferences, any dependent packages that don't match won't be installed from the given release. The use case for this functionality is in systems managed by configuration management software (e.g. puppet), where it's much more straightforward to specify behavior in a configuration file than via flags to a specific command. For example, I need the newer functionality of the version of syslog-ng in wheezy backports. With the following apt_preferences file: > Package: syslog-ng* > Pin: release n=wheezy-backports > Pin-Priority: 990 > "apt-get install syslog-ng" gives this error: > Reading package lists... Done > Building dependency tree > Reading state information... Done > Some packages could not be installed. This may mean that you have > requested an impossible situation or if you are using the unstable > distribution that some required packages have not yet been created > or been moved out of Incoming. > The following information may help to resolve the situation: > > The following packages have unmet dependencies: > syslog-ng : Depends: syslog-ng-mod-mongodb but it is not going to be > installed > E: Unable to correct problems, you have held broken packages. >From "apt-get install syslog-ng-mod-mongodb", the issue is this: > The following packages have unmet dependencies: > syslog-ng-mod-mongodb : Depends: libmongo-client0 (>= 0.1.6) but > 0.1.5-1+deb7u1 is to be installed This is because libmongo-client0 doesn't match the glob "syslog-ng*" in the preferences file. However, "apt-get -t wheezy-backports install syslog-ng" correctly installs all the dependencies from backports. -- Package-specific info: -- (no /etc/apt/preferences present) -- -- (no /etc/apt/sources.list present) -- -- System Information: Debian Release: 7.8 Architecture: amd64 (x86_64) Kernel: Linux 3.2.65-vs2.3.2.17-beng (SMP w/16 CPU cores) Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages apt depends on: ii debian-archive-keyring 2014.3~deb7u1 ii gnupg 1.4.12-7+deb7u6 ii libapt-pkg4.12 0.9.7.9+deb7u6 ii libc6 2.13-38+deb7u6 ii libgcc1 1:4.7.2-5 ii libstdc++6 4.7.2-5 apt recommends no packages. Versions of packages apt suggests: pn apt-doc <none> ii aptitude 0.6.8.2-1 ii dpkg-dev 1.16.15 ii python-apt 0.8.8.2 ii xz-utils 5.1.1alpha+20120614-2 -- Configuration Files: /etc/cron.daily/apt [Errno 2] No such file or directory: u'/etc/cron.daily/apt' -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org