
debuild possui uma opção --lintian-opts
que permite passar opções para o lintian. Como posso passar opções para o lintian do pdebuild?
Responder1
debuild
chama lintian
diretamente, e é por isso que tem a opção de passar argumentos para ele. pdebuild
não.
Se você quiser adicionar uma lintian
invocação à sua pdebuild
execução, normalmente adicionaria um pbuilder
gancho e especificaria opções nele. Veja /usr/share/doc/pbuilder/examples/B90lintian
um exemplo de gancho eComo executo o lintian a partir do pbuilder-dist?para obter detalhes sobre como usá-lo.
Responder2
Aqui está minha versão estendida B90lintian
que suporta a passagem de opções para o 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
As variáveis de ambiente LINT
e LINTOPTS
podem ser usadas para invocar o lintian e passar algumas opções para ele.