Size: 1746
Comment: AptConf refactored
|
Size: 2121
Comment: WIP merge AptPreferences, add manpage links
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
* command-line options | |
Line 8: | Line 9: |
* preferences | * apt_preferences |
Line 10: | Line 11: |
* apt.conf.d | * apt.conf |
Line 12: | Line 13: |
=== apt.conf.d === | |
Line 14: | Line 14: |
Apt accepts configuratino files (without extension) in {{{/etc/apt/apt.conf.d/}}}. These are processed by Apt in numeric/alphabetical order. {{{/etc/apt/apt.conf}}} is also valid but deprecated. | === apt.conf === See [[DebianMan:apt.conf.5|man 5 apt.conf]] Apt accepts configuration files (without extension) in {{{/etc/apt/apt.conf.d/}}}. These are processed by Apt in numeric/alphabetical order. {{{/etc/apt/apt.conf}}} is also valid but deprecated. |
Line 45: | Line 50: |
=== apt_preferences === See [[DebianMan:apt_preferences.5|man 5 apt_preferences]] === Command line options === PackageManagementTools such as {{{apt}}}, {{{aptitude}}}, {{{apt-get}}}... allow you to set specific configuration options for a single run. See their respective ManPages. |
WIP: refactoring of https://wiki.debian.org/AptConf and other apt configuration pages
Apt is configured by several resources, including:
- command-line options
?AptKeys
- apt_preferences
- apt.conf
apt.conf
See man 5 apt.conf
Apt accepts configuration files (without extension) in /etc/apt/apt.conf.d/. These are processed by Apt in numeric/alphabetical order. /etc/apt/apt.conf is also valid but deprecated.
These files can contain various directives:
Dpkg::Pre-Install-Pkgs {"mycommand";};: executes mycommand before package installation/unpacking by Dpkg.
Dpkg::Pre-Invoke {"mycommand";};: executes mycommand before apt calls dpkg
Dpkg::Post-Invoke {"mycommand";};: executes mycommand after apt calls dpkg
Pre-Install-Pkgs: ??? TODO
APT::Default-Release "testing";: sets the default Debian release used by Apt (TODO use case?)
APT::Cache-Limit 10000000;: ??? TODO
Apt::Get::Purge;: ??? TODO
Acquire::http::Proxy "http://proxy:8080";: sets the proxy for HTTP downloads
Acquire::https::Proxy "https://proxy:8443";: sets the proxy for HTTPS downloads
Acquire::http::Timeout "2";: sets the timeout for HTTP downloads
Acquire::https::Timeout "2";: sets the timeout for HTTPS downloads
Acquire::ftp::Timeout "2";: sets the timeout for FTP downloads
If you really have to use FTP, this sets the FTP proxy:
Acquire::ftp { Proxy "ftp://proxy:2121/"; ProxyLogin { "USER $(SITE_USER)@$(SITE)"; "PASS $(SITE_PASS)"; } }
apt_preferences
Command line options
PackageManagementTools such as apt, aptitude, apt-get... allow you to set specific configuration options for a single run. See their respective ?ManPages.