Differences between revisions 8 and 9
Revision 8 as of 2005-07-05 10:52:46
Size: 1198
Editor: anonymous
Comment:
Revision 9 as of 2006-08-06 20:29:59
Size: 1614
Editor: ?julian
Comment:
Deletions are marked like this. Additions are marked like this.
Line 47: Line 47:

Here is a whole example apt.conf file using stable:
{{{
PT::Default-Release "stable";
APT::Cache-Limit 10000000;
Apt::Get::Purge;
//comment begins with //
//had problems with running MMap runs out of room, so add cache-limit//
APT::Cache-Limit "25165824";
//Server down takes too long, add timout
Acquire::http::Timeout "2";
Acquire::ftp::Timeout "2";
}}}

["?AptDirectory"]


/etc/apt/conf file

Debconf configuration is initiated with following line. There is no need to add it, as it is already there by default, it is shown here only as an example. The command in brackets could be any arbitrary command to be executed in shell.

 Dpkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt |||| true";};

There are also options

 Dpkg::Pre-Invoke {"command";};
 Dpkg::Post-Invoke {"command";};

They execute commands before/after apt calls dpkg. One thing to note is that with Pre-Install-Pkgs deb package path is passed on to stdin from apt, eg. when installing package gnome the following is stdin of called command:

 /var/cache/apt/archives/gnome_2.10.1.1_all.deb

An example that sets default release to testing:

 APT::Default-Release "testing";

You can use this example for HTTP proxy:

 Acquire::http::Proxy "http://proxy:8080";

And this one for FTP proxy (NOTE: Only change proxy hostname and port):

 Acquire::ftp
 {
   Proxy "ftp://proxy:2121/";
   ProxyLogin
   {
      "USER $(SITE_USER)@$(SITE)";
      "PASS $(SITE_PASS)";
   }
 }

Here is a whole example apt.conf file using stable:

PT::Default-Release "stable";
APT::Cache-Limit 10000000;
Apt::Get::Purge;
//comment begins with //
//had problems with running MMap runs out of room, so add cache-limit//
APT::Cache-Limit "25165824";
//Server down takes too long, add timout
Acquire::http::Timeout "2";
Acquire::ftp::Timeout "2";