Debian

From AdminWiki

Revision as of 00:24, 25 May 2006 by Gullevek (Talk | contribs)
Jump to: navigation, search

Contents

Evaluation

Pro-contra

Tips and tricks

apt/dpkg

How do I check what version package $x gets upgraded to?

 apt-cache policy <package>

How can I install packages from unstable in testing? Apt-Pinning

apt-pinning is the answer.

You have to edit or create those configuration files

  • /etc/apt/sources
  • /etc/apt/apt.conf
  • /etc/apt/preferences

In /etc/apt/sources/ add the other distributions you want to use. For example if you are in testing, add the same entries with unstable or higher.

 # testing
 deb http://ftp.debian.org/debian/ testing main contrib
 deb-src http://ftp.debian.org/debian/ testing main contrib
 # unstable
 deb http://ftp.debian.org/debian/ unstable main contrib
 deb-src http://ftp.debian.org/debian/ unstable main contrib
 # experimental
 deb http://ftp.debian.org/debian/ experimental main contrib
 deb-src http://ftp.debian.org/debian/ experimental main contrib

In /etc/apt/apt.conf set a higher cache limit for apt-get so it doesn't run out of memory during updates

 APT::Cache-Limit "141942904";

In /etc/apt/preferences add the higher trees with a lower Priority so they do not overwrite your basic packages from your main tree.

 # testing
 Package: *
 Pin: release a=testing
 Pin-Priority: 650
 # unstable
 Package: *
 Pin: release a=unstable
 Pin-Priority: 600
 # experimental
 Package: *
 Pin: release b=experimental
 Pin-Priority: 550

In case you want to have a certain package from eg unstable overrule the testing package, add a new entry like this

 Package: mutt
 Pin: release a=unstable
 Pin-Priority: 700

To install packages there are two ways. One is to try to install just the package, and the other way is to install all the packages and also the ones needed to satisfy its dependencies. The second choice is of course more dangerous because it can overwrite important libraries and make your system unstable.

to install just the package:

 apt-get install <package>/<tree>

to install the package and all needed dependencies:

 apt-get -t <tree> install <package>

<tree> stands for the release, eg testing, unstable, ...

more information:

http://jaqque.sbih.org/kplug/apt-pinning.html

--gullevek 02:24, 25 May 2006 (CEST)

Personal tools