Scroll to navigation

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

NOMBRE

apt-config - Programa para consultar la configuración de APT

SINOPSIS

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

DESCRIPCIÓN

apt-config es un programa interno que usan varios programas del conjunto de herramientas de APT para ofrecer un método de configuración sólido. Este programa accede al fichero principal de configuración /etc/apt/apt.conf de forma que resulta sencillo de usar por aplicaciones con scripts.

A menos que se use la opción -h o --help, una de las siguientes órdenes debe estar presente.

shell

Se utiliza para acceder a la información de la configuración mediante un script. Se proporcionan parejas de argumentos, el primero es una variable del intérprete de órdenes y el segundo el valor de la configuración que consultar. Como salida muestra una serie de órdenes asignadas al intérprete de órdenes para cada valor presente. Esto se debería usar de la siguiente manera en un script de intérprete de órdenes:

OPTS="-f"
RES=`apt-config shell OPTS MiAplicación::opciones`
eval $RES
Esto define la variable de entorno del intérprete de órdenes $OPTS con el valor de MyApp::Opciones, y con -f por omisión.

La opción de configuración se puede corregir posteriormente con un «/[fdbi]». El parámetro «f» devuelve nombres de fichero, «d» devuelve los directorios, «b» devuelve verdadero o falso, e «i» devuelve un número entero. Cada uno de los valores devueltos se normaliza y se verifica internamente.

dump

Sólo muestra el contenido del espacio de configuración.

OPCIONES

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

Incluye opciones con un valor vacío. Este es el comportamiento predeterminado, utilice «--no-empty» para eliminarlos de la salida.

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

Define la salida de cada opción de configuración. %t se sustituye con el nombre individual, %f con el nombre jerárquico completo, y %v con su valor. Si utiliza letras mayúsculas, los caracteres especiales del valor se codificaran para garantizar su uso seguro en una cadena delimitada por comillas, como define RFC822. Además, %n se sustituye con una línea nueva, y %N con una tabulación. Se puede mostrar un % utilizando %%.

-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.

VÉASE TAMBIÉN

apt.conf(5)

DIAGNÓSTICOS

apt-config devuelve cero si no hay ningún error, y el valor 100 en caso de error.

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.

AUTORES

Jason Gunthorpe

APT team

NOTAS

1.
APT bug page
30 Noviembre 2013 APT 1.4.9