/etc/apt/preferences and /etc/apt/preferences.d/* are ignored.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
APT |
Invalid
|
Undecided
|
Unassigned | ||
apt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Apt pinning is not possible, because /etc/apt/
I know that they are ignored, because I made syntax error (after I had set up pinnings on both computers and noticed that they didn'' work on Ubuntu) in that file with two computers running different distribution. Debian gave error, Ubuntu didn't do anything.
Apt pinning with these files is referred from wiki pages and man pages.
I am using Ubuntu 11.10
Package version is 0.8.16~exp5ubuntu13
% apt-get --version
apt 0.8.16~exp5ubuntu13 laitealustalle i386 käännöksen päiväys Oct 6 2011 15:25:29
Tuetut moduulit:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
Pkg: Debian APT solver interface (Priority -1000)
S.L: 'deb' Standard Debian binary tree
S.L: 'deb-src' Standard Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian Translation Index
Idx: Debian dpkg status file
Idx: EDSP scenario file
I expected packages to get pinned.
What happened instead: apt just ignored /etc/apt/
Steps to reproduce:
1. Write anything to /etc/apt/
2. That file is ignored in Ubuntu (with Debian you get error).
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt 0.8.16~exp5ubuntu13
ProcVersionSign
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelMo
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Thu Nov 17 18:20:44 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
SourcePackage: apt
UpgradeStatus: Upgraded to oneiric on 2011-10-09 (39 days ago)
I've added two files to /etc/apt/ preferences. d, one containing a pin, the other nonsense:
$ cat /etc/apt/ preferences. d/apache
Package: apache2
Pin: release n=lucid
Pin-Priority: 900
Package: apache2
Pin: release n=precise
Pin-Priority: 100
$ cat /etc/apt/ preferences. d/wurst
just a test
Upon 'apt-cache policy apache2' I get an error for wurst and the pinning (sort of) worked: 2.22-1ubuntu1 900 archive. ubuntu. com/ubuntu/ precise/main i386 Packages 2.14-5ubuntu8 900 archive. ubuntu. com/ubuntu/ lucid/main i386 Packages sources. list.d/ a.list. preferences. d/wurst, no Package header
apache2:
Installed: (none)
Candidate: 2.2.14-5ubuntu8
Package pin: 2.2.14-5ubuntu8
Version table:
2.
500 http://
2.
500 http://
N: Can not read /etc/apt/
E: Invalid record in the preferences file /etc/apt/
Not sure why 2.2.22-1ubuntu1 is listed with 900 instead of 100, though. Can you provide steps to reproduce your problem?