How to force debian squeeze to use libqt4-dev from debian wheezy without upgrading all packages to debian wheezy?

StackOverflow https://stackoverflow.com/questions/15936318

  •  03-04-2022
  •  | 
  •  

Question

I have a continuous integration server building some software that depends on a more recent version of libqt4-dev than the apt packages in debian squeeze provide. That version is available in debian wheezy. How can I tell apt to use libqt4-dev selectively from wheezy without upgrading all of the packages in my squeeze system to wheezy?

Was it helpful?

Solution

You can do this with apt's "preferences" functionality (man apt_preferences).

To add wheezy as a source of packages without installing anything from wheezy by default, add entries for wheezy to your sources.list, and add the following to /etc/apt/preferences (or to a file in preferences.d):

Package: *
Pin: release n=wheezy
Pin-Priority: 50

Once that is set up, you can install libqt4-dev with the following command:

apt-get install -t wheezy libqt4-dev

This will also install the dependencies of libqt4-dev, which may be numerous. Not being familiar with qt, I'm not sure whether the pinning solution here is the best way to get the newer version of qt onto a squeeze system. Another possibility is the backports repository, but I don't see qt4 in there. A third possibility is to build your own backported version using apt-get -b source.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top