Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm building a package from source in Debian Wheezy, which has a few build-deps that cannot be satisfied by stable. Therefore, I use a few packages from unstable, testing and wheezy-backports.

The best way to do these until now has been to combine the commands using "&&" and using the "-y" switch, like this:

apt-get -y -t testing install pkg1 && apt-get -y -t wheezy-backports install pkg2 && apt-get -y install pkg3

But this still makes apt-get read the package list and check for dependencies for every apt-get separated with "&&". My build-machine is quite slow, and every step takes a lot of time, and I hoped I could shave of a few minutes by saving the redundant package-list reading and dependency checking and get apt-get to do it all at once, something like this:

apt-get -t testing install pkg1, -t wheezy-backports install pkg2, install pkg3    

I haven't been able to find anything about the topic, and am not too optimistic, but maybe someone knows a way?

share|improve this question

1 Answer 1

from man aptitude:

to select a particular version of the package, append "=" to the package name: for instance, "aptitude install apt=0.3.1". Similarly, to select a package from a particular archive, append "/" to the package name: for instance, "aptitude install apt/experimental".

so the solution to your problem is using aptitude (which i would recommend anyhow in favour of apt-get):

aptitude install pkg1/testing pkg2/wheezy-backports pkg3
share|improve this answer

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.