Pasar opciones a lintian en pdebuild

Pasar opciones a lintian en pdebuild

debuild tiene una opción --lintian-optsque permite pasar opciones a lintian. ¿Cómo puedo pasar opciones a lintian desde pdebuild?

Respuesta1

debuildllama lintiandirectamente, por lo que tiene una opción para pasarle argumentos. pdebuildno.

Si desea agregar una lintianinvocación a su pdebuildejecución, normalmente agregará un pbuilderenlace y especificará opciones allí. Véase /usr/share/doc/pbuilder/examples/B90lintianun 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 B90lintianque 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 LINTy LINTOPTSse pueden usar para invocar a lintian y pasarle algunas opciones.

información relacionada