
debuild tiene una opción --lintian-opts
que permite pasar opciones a lintian. ¿Cómo puedo pasar opciones a lintian desde pdebuild?
Respuesta1
debuild
llama lintian
directamente, por lo que tiene una opción para pasarle argumentos. pdebuild
no.
Si desea agregar una lintian
invocación a su pdebuild
ejecución, normalmente agregará un pbuilder
enlace y especificará opciones allí. Véase /usr/share/doc/pbuilder/examples/B90lintian
un ejemplo de gancho, y¿Cómo ejecuto lintian desde pbuilder-dist?para obtener detalles sobre cómo usarlo.
Respuesta2
Aquí está mi versión extendida B90lintian
que admite el paso de opciones a lintian:
#!/bin/bash
set -e
BUILDDIR="${BUILDDIR:-/tmp/buildd}"
if [ "$LINT" = 1 ] || [ -n "$LINTOPTS" ]; then
apt-get install -y "${APTGETOPT[@]}" lintian
# Because pbuilder has not home directory, calling su - pbuilder will print
# su: warning: cannot change directory to /nonexistent: No such file or directory
# To avoid that warning and to provide the proper current working directory for any
# relative file names used in LINTOPTS, set pbuilder's home directory to source
# directory, which is the (only) subdirectory of the build directory
usermod --home "$BUILDDIR"/*/ pbuilder
echo "I: start of lintian output"
# use this version if you want lintian to fail the build
#su -c "lintian -I --show-overrides $LINTARGS $BUILDDIR/*.changes" - pbuilder
# use this version if you don't want lintian to fail the build
su -c "lintian -I --show-overrides $LINTOPTS $BUILDDIR/*.changes; :" - pbuilder
echo "I: end of lintian output"
fi
Las variables de entorno LINT
y LINTOPTS
se pueden usar para invocar a lintian y pasarle algunas opciones.