2182
Comment:
|
2085
||||->||
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[AptConf|English]] - Italiano-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| | ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[AptConf|English]] - Italiano - [[pt_BR/AptConf|Português Brasileiro]]-~ |
Line 12: | Line 12: |
Dpkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt |||| true";}; | Dpkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";}; |
Translation(s): English - Italiano - ?Português Brasileiro
ToDo: /etc/apt/conf file no longer exists (at least in testing), the configuration is now modular and the topic should be extended
specifically we are talking here about /etc/apt/apt.conf.d/70debconf file
il file /etc/apt/conf
La configurazione di Debconf è inizializzata dalla seguente riga. Non c'è bisogno di aggiungerla in quanto già presente in modo predefinito, è qui solo come esempio. Il comando tra parentesi potrebbe essere un qualsiasi comando arbitrario da eseguire nella shell.
Dpkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
Ci sono anche delle opzioni
Dpkg::Pre-Invoke {"command";}; Dpkg::Post-Invoke {"command";};
Eseguono comandi prima/dopo che apt richiami dpkg. Una particolare da notare è che con Pre-Install-Pkgs il percorso del pacchetto viene passato da apt allo stdin, ad esempio ciò che segue è lo stdin del comando chiamato installando il pacchetto gnome:
/var/cache/apt/archives/gnome_2.10.1.1_all.deb
Un esempio che imposta testing come versione predefinita (si può anche usare il nome, come lenny o squeeze):
APT::Default-Release "testing";
È possibile utilizzare un proxy HTTP:
Acquire::http::Proxy "http://proxy:8080";
E questo per un proxy FTP (NOTA: cambia solo il nome dell'host e la porta):
Acquire::ftp { Proxy "ftp://proxy:2121/"; ProxyLogin { "USER $(SITE_USER)@$(SITE)"; "PASS $(SITE_PASS)"; } }
Ecco un esempio di un file apt.conf che usa stable:
APT::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";