LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How can I install just one or two packages from another "favor" with apt-get? (https://www.linuxquestions.org/questions/debian-26/how-can-i-install-just-one-or-two-packages-from-another-favor-with-apt-get-168117/)

davidas 04-09-2004 09:22 AM

How can I install just one or two packages from another "favor" with apt-get?
 
I'm currently on "Sarge". How do I go about using apt-get install, apt-file search and apt-cache search on another favor(eg. Unstable), without affecting the integrity of my packages which are on "Sarge" distribution?

Thanks :)

CBlue 04-09-2004 09:39 AM

Edit your /etc/apt/sources.list and uncomment the unstable urls for debian addresses. Then use synaptic to browse the packages in upgrade and install areas. Synaptic will show a tab for a description of the package and also the dependencies. You can then decide whether or not it will be safe for you to use packages that come from unstable. It's easier to see dependencies this way instead of just using apt-get.

HappyTux 04-09-2004 02:03 PM

Re: How can I install just one or two packages from another "favor" with apt-get?
 
Quote:

Originally posted by davidas
I'm currently on "Sarge". How do I go about using apt-get install, apt-file search and apt-cache search on another favor(eg. Unstable), without affecting the integrity of my packages which are on "Sarge" distribution?

Thanks :)

You would need to use apt pinning in your /etc/apt/apt.conf you need a Default Release line telling the package system which branch of the archives you want to track. Then you need an /etc/apt/preferences file to define the pin priority for the packages.

Code:

>$ cat /etc/apt/apt.conf
APT::Default-Release "testing";
APT::Get::Show-Versions "true";
APT::Cache-Limit 10000000;
Apt::Get::Purge;
APT::Clean-Installed;

>$ cat /etc/apt/preferences
Package: *
Pin: release testing
Pin-Priority: 900

Package: *
Pin: release unstable
Pin-Priority: 600

Make sure that you have the Cache-Limit line in the apt.conf file before you apt-get update after adding unstable to the sources.list or your apt cache will give you a Dynamic mmap out of room error. Now when you install a package you will get it from testing by default and if you want to install a package from unstable you would use apt-get -t unstable install package_name and it would install the package from unstable sometimes it complains about a version of a library that needs to be a higher version before it will install a package you would just add it on to the end of the install line to get the version needed from the unstable branch.

davidas 04-09-2004 06:58 PM

Re: Re: How can I install just one or two packages from another "favor" with apt-get?
 
For commands like apt-cache search and apt-file search, will they search from the unstable branch too, if testing branch is my default?

Also, if you do a apt-cache show <packagename>, will they show information of the package from the testing or unstable branch?

Thanks :)


Quote:

Originally posted by HappyTux
You would need to use apt pinning in your /etc/apt/apt.conf you need a Default Release line telling the package system which branch of the archives you want to track. Then you need an /etc/apt/preferences file to define the pin priority for the packages.

Code:

>$ cat /etc/apt/apt.conf
APT::Default-Release "testing";
APT::Get::Show-Versions "true";
APT::Cache-Limit 10000000;
Apt::Get::Purge;
APT::Clean-Installed;

>$ cat /etc/apt/preferences
Package: *
Pin: release testing
Pin-Priority: 900

Package: *
Pin: release unstable
Pin-Priority: 600

Make sure that you have the Cache-Limit line in the apt.conf file before you apt-get update after adding unstable to the sources.list or your apt cache will give you a Dynamic mmap out of room error. Now when you install a package you will get it from testing by default and if you want to install a package from unstable you would use apt-get -t unstable install package_name and it would install the package from unstable sometimes it complains about a version of a library that needs to be a higher version before it will install a package you would just add it on to the end of the install line to get the version needed from the unstable branch.



All times are GMT -5. The time now is 05:32 PM.