Scroll to navigation

APT-CONFIG(8) APT APT-CONFIG(8)

NOM

apt-config - Programme d'interrogation de la configuration d'APT

SYNOPSIS

apt-config [--empty] [--format ' %f "%v";%n'] [-o=config_string] [-c=config_file] {shell | dump | {-v | --version} | {-h | --help}}

DESCRIPTION

apt-config est un programme interne utilisé par différents composants d'APT ; il offre la possibilité d'une configuration cohérente et permet aux applications conçues sous forme de script une utilisation simple du fichier de configuration principal /etc/apt/apt.conf.

À moins que l'option -h ou --help ne soit donnée, l'une des commandes suivantes doit être présente.

shell

Le terme shell est utilisé pour accéder aux informations de configuration depuis un script shell. Deux arguments doivent lui être donnés ; le premier est une variable du shell et le second une valeur de configuration à demander. La sortie standard consiste en une liste de commandes d'assignation de shell pour chaque valeur présente. Dans un script shell, cette commande devrait être utilisée comme suit :

OPTS="-f"
RES=`apt-config shell OPTS MyApp::Options`
eval $RES
La variable d'environnement du shell $OPTS sera définie par la valeur de MyApp::Options ou, par défaut, la valeur -f.

L'élément de configuration peut être suivi par /[fdbi]. « f » renvoie un nom de fichier, « d » un nom de répertoire, « b » renvoie « true » ou « false » et « i » renvoie un entier. Chacune de ses valeurs est normalisée et vérifiée.

dump

Affiche seulement le contenu de l'espace de configuration.

OPTIONS

All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations.

--empty

Inclure les options qui ont une valeur vide. Ce comportement est celui par défaut ; il est donc conseillé d'utiliser --no-empty pour les supprimer de ce qui est retourné.

--format '%f "%v";%n'

Définit ce que retourne chaque option de configuration. %t sera remplacé par son nom individuel, %f par le nom hiérarchique complet et %v par la valeur. Les majuscules et les caractères spéciaux dans la valeur seront encodés afin de pouvoir être utilisés sans problèmes, par exemple dans une chaîne définie par RFC822. Par ailleurs, %n sera remplacé par un retour à la ligne et %N par une tabulation. Le caractère % peut être affiché avec %% .

-h, --help

Show a short usage summary.

-v, --version

Show the program version.

-c, --config-file

Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the APT_CONFIG environment variable. See apt.conf(5) for syntax information.

-o, --option

Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options.

VOIR AUSSI

apt.conf(5)

DIAGNOSTICS

apt-config retourne zéro après un déroulement normal, et le nombre 100 en cas d'erreur.

BUGS

APT bug page[1]. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

TRANSLATION

The english translation was done by John Doe <john@doe.org> in 2009, 2010 and Daniela Acme <daniela@acme.us> in 2010 together with the Debian Dummy l10n Team <debian-l10n-dummy@lists.debian.org>.

Note that this translated document may contain untranslated parts. This is done on purpose, to avoid losing content when the translation is lagging behind the original content.

AUTEURS

Jason Gunthorpe

APT team

NOTES

1.
APT bug page
30 novembre 2013 APT 1.4.9