pdebuild의 lintian에 옵션 전달

pdebuild의 lintian에 옵션 전달

--lintian-optsdebuild에는 lintian에 옵션을 전달할 수 있는 옵션이 있습니다 . pdebuild에서 lintian에 옵션을 전달하는 방법은 무엇입니까?

답변1

debuild직접 호출 lintian되므로 인수를 전달할 수 있는 옵션이 있습니다. pdebuild아니요.

실행 lintian에 호출을 추가 하려면 일반적으로 후크를 추가하고 그 안에 옵션을 지정해야 합니다. 예제 후크를 참조하세요 .pdebuildpbuilder/usr/share/doc/pbuilder/examples/B90lintianpbuilder-dist에서 lintian을 실행하는 방법은 무엇입니까?사용 방법에 대해 자세히 알아보세요.

답변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

환경 변수 LINTLINTOPTSlintian을 호출하고 일부 옵션을 전달하는 데 사용할 수 있습니다.

관련 정보