LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Debian: apt setup for apt-pinning (http://www.linuxquestions.org/questions/linux-newbie-8/debian-apt-setup-for-apt-pinning-883428/)

<Ol>Origy 05-30-2011 12:38 AM

Debian: apt setup for apt-pinning
 
Okay, I rarely post topics here, but I think this one fits into a newbie section. :-/

Here's the deal. I'm running a stable version of Debian 6, and I would like to install a package from the unstable (sid) repo. Now most tutorials on google suggest that I should edit my /etc/apt/preferences and /etc/apt/apt.conf files to add a few lines. I have checked the /etc/apt folder and the two mentioned files do not exist. But two directories with similar names do: /etc/apt/preferences.d/ and /etc/apt/apt.conf.d/

This confuses me. Should I simply create the "preferences" and "apt.conf" files like the tutorials suggest or is this some form of different apt configuration where appropriate files have to be put inside these folders (like apache2 which uses sites-enabled and sites-available instead of one large httpd.conf file)?

Regards

andrewthomas 05-30-2011 12:58 AM

Anything that the tutorial says to put in /etc/apt/preferences can be put in a file in /etc/apt/preferences.d/ directory and the same with /etc/apt/conf.d

<Ol>Origy 05-30-2011 10:11 AM

And I take it that it is irrelevant what the file name is as long as it resides in one of those two directories, yes?

andrewthomas 05-30-2011 09:48 PM

correct

sumeet inani 05-31-2011 07:01 AM

Reminds me of my debian squeeze.

I create file <any-name>.list containing
Code:

deb file:/root <folder>/
in /etc/apt/sources.list.d when I create Packages.gz file ( in /root/<folder> ) locally using 'dpkg-scanpackages' .

So I don't touch /etc/apt/sources.list
Then 'apt-get update' adds my local packages in 'apt-cache' list.

craigevil 05-31-2011 10:33 AM

Take a look at:
AptPreferences - Debian Wiki - http://wiki.debian.org/AptPreferences
Apt-Pinning for Beginners - http://jaqque.sbih.org/kplug/apt-pinning.html
Chapter*2.*Debian package management - http://www.debian.org/doc/manuals/de...didate_version

All of the info you need is in the Debian docs and/or the wiki.


All times are GMT -5. The time now is 08:59 AM.