
debuild имеет опцию --lintian-opts
, которая позволяет передавать опции в lintian. Как передать опции в lintian из pdebuild?
решение1
debuild
вызывает lintian
напрямую, поэтому у него есть возможность передавать ему аргументы. pdebuild
не делает.
Если вы хотите добавить lintian
вызов в свой pdebuild
запуск, вы обычно добавляете pbuilder
хук и указываете там параметры. Смотрите /usr/share/doc/pbuilder/examples/B90lintian
пример хука иКак запустить lintian из pbuilder-dist?для получения подробной информации о том, как его использовать.
решение2
Вот моя расширенная версия, B90lintian
которая поддерживает передачу параметров в 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
Переменные окружения LINT
и LINTOPTS
могут использоваться для вызова lintian и передачи ему некоторых параметров.