Why won't this apt pinning stick?

Solution 1:

Is it possible that you're being bitten by this bug?

On a mixed sid/testing system, the same text behaves differently whether placed in /etc/apt/preferences or in /etc/apt/preferences.d/pinning.

apt-get respects files placed in either location, and apt-cache policy also shows the expected behavior. aptitude alone behaves this way.

I saw the same behavior on version 0.4.11.11-1+b2, and tried upgrading to 0.6.1.3-3 to see if it was fixed in sid, but the misbehavior remains.

According to the most recent update, this is fixed in aptitude 0.6.3-3.2