Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

UPDATE: I am putting a bounty on this question, in modified form:

How can I make APT Pinning run as expected? Or where must I read more (save from the official Wiki and errata/additions in it) so that I understand how is it working AND do what the original question says I wanna do?

Long story short, I am running Debian squeeze (version 6) and I want to keep it that way. And I want to be able to install packages from testing/unstable if the need calls for it. Thus, I have this setup:

(TLDR: 2 questions at the end)

# /etc/apt/sources.list
deb http://ftp.uni-sofia.bg/debian/ squeeze main contrib non-free
deb-src http://ftp.uni-sofia.bg/debian/ squeeze main contrib non-free
deb http://ftp.uni-sofia.bg/debian/ wheezy main contrib non-free
deb-src http://ftp.uni-sofia.bg/debian/ wheezy main contrib non-free

I also have /etc/apt/preferences:

Package: *
Pin: release a=squeeze
Pin-Priority: 1100

Package: *
Pin: release a=wheezy
Pin-Priority: 200

apt-get update does not ignore the wheezy repo, I double- and triple-checked.

Basically I wanna have Wine use PulseAudio, but that's another topic. :-) Right now I would just like to be able to install libasound2-plugins from wheezy. I somehow managed to install libasound2 from wheezy, but now I cannot make it do the same for libasound2-plugins.

Naturally, I tried apt-get -t wheezy install libasound2-plugins. Here is the output:

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:
 initscripts : Breaks: console-setup (< 1.74) but 1.68+squeeze2 is to be installed
               Breaks: nfs-common (< 1:1.2.5-3) but 1:1.2.2-4squeeze2 is to be installed
 libglib2.0-0 : Breaks: emacs23 (< 23.4+1-3)
                Breaks: eog (< 3.2.2-3) but 2.30.2-1 is to be installed
                Breaks: gnome-control-center (< 1:3) but 1:2.30.1-2 is to be installed
 network-manager : Recommends: crda but it is not going to be installed
                   Breaks: network-manager-gnome (< 0.9) but 0.8.1-2 is to be installed
E: Broken packages

Now here is the thing. I don't want GNOME 3. (notice the message: gnome-control-center (< 1:3) but 1:2.30.1-2 is to be installed Or, while we are at it, I dislike having to fully migrate to testing/unstable just for a few packages.

Finally, APT pinning doesn't seem to work well for me, have a look at that:

apt-cache policy libasound2

libasound2:
  Installed: 1.0.25-2
  Candidate: 1.0.25-2
  Version table:
 *** 1.0.25-2 0
        500 http://ftp.uni-sofia.bg/debian/ wheezy/main amd64 Packages
        100 /var/lib/dpkg/status
     1.0.23-2.1 0
        500 http://ftp.uni-sofia.bg/debian/ squeeze/main amd64 Packages

Everything somehow assumes pin priority of 500, when the fact is, I specified 1100 and 200 for squeeze and wheezy, respectively.

So on to my 2 questions:

  1. How can I even install libasound2-plugins from wheezy without APT freaking out and wanting me to either (1) upgrade half my distribution packages or (2) complain about broken packages?
  2. How can I even make APT pinning work properly? I have read the official Wiki, the errata and several articles trying to elaborate on lacklusters in the official Wiki, to no avail for now.

I will be very grateful for every suggestion which englightens me.

Thanks for your time.

share|improve this question
    
When this Q is available for bounty, I am gonna put a bounty on the second question. C'mon people, help me out! :-) –  dimitko May 12 '12 at 12:19
    
If you need this sort of things, you are basically using the wrong distribution. Debian and Ubuntu have a package system that doesn't allow to install more than one version of the same library. Gentoo and FreeBSD are much more flexible in this sense. You should give them a try. –  Avio May 18 '12 at 21:41
add comment

1 Answer

up vote 1 down vote accepted

The answer to your first question would be:

Add

APT:Default-release "stable";

to your /etc/apt/apt.conf and then install the desired Wheezy packages with aptitude:

aptitude install libasound2-plugins/wheezy

That's how you usually would pull Wheezy packages on Squeeze, aptitude helps to handle depends and you won't have to install 80% of Wheezy for just one package.

share|improve this answer
    
Tried to follow your instructions (also used this man page: ccrma.stanford.edu/planetccrma/man/man5/apt_preferences.5.html). It's a step in the right direction, but best solution aptitude can offer me is to remove several versions of GCC, the linux headers, the VLC player (OK I won't mourn that one), the pulseaudio-module-gconf (that would be nasty -- I do want to have volume controls after all), and a few others *-dev packages. –  dimitko May 16 '12 at 23:10
    
Perhaps, try with a --nodeps flag and see how the package would behave? Another solution would be to compile and build your own package from source. –  MilanorTSW May 17 '12 at 2:05
    
You could also try to make and install "fake" packages to satisfy dependencies. –  MilanorTSW May 17 '12 at 2:11
    
aptitude's resolver can behave in pretty strange ways sometimes. Try it with just apt-get install libasound2-plugins/wheezy? Sometimes apt-cli gives much more sane results. –  Darael May 17 '12 at 11:56
    
Darael - see my OP above. Tried that variant as well, same output as above. MilanorTSW - my aptitude doesn't recognize --nodeps. Its version is: 0.6.3. Also, what do you mean "fake" packages, could you please elaborate? And finally, could you suggest an exact workflow on compiling libasound2-plugins? I am on a i5 CPU [AMD64] machine, by the way. –  dimitko May 17 '12 at 13:47
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.