From: Erich Eckner <git@eckner.net> Variables from the config make no difference with `--printsrcinfo`, also the directory permissions ($SRCDEST, $PKGDEST, $SRCPKGDEST, $BUILDDIR) do not matter in that case. This relieves one from customizing /etc/makepkg.conf on a system, where only ever `makepkg --printsrcinfo` will be invoked, solely to get rid of lint warnings. Signed-off-by: Erich Eckner <git@eckner.net> --- scripts/makepkg.sh.in | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index e134200f..f5f5f4f7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1135,24 +1135,26 @@ else fi -# check makepkg.conf for some basic requirements -lint_config || exit $E_CONFIG_ERROR +if (( !PRINTSRCINFO )); then + # check makepkg.conf for some basic requirements + lint_config || exit $E_CONFIG_ERROR -# check that all settings directories are user-writable -if ! ensure_writable_dir "BUILDDIR" "$BUILDDIR"; then - plain "$(gettext "Aborting...")" - exit $E_FS_PERMISSIONS -fi + # check that all settings directories are user-writable + if ! ensure_writable_dir "BUILDDIR" "$BUILDDIR"; then + plain "$(gettext "Aborting...")" + exit $E_FS_PERMISSIONS + fi -if (( ! (NOBUILD || GENINTEG) )) && ! ensure_writable_dir "PKGDEST" "$PKGDEST"; then - plain "$(gettext "Aborting...")" - exit $E_FS_PERMISSIONS -fi + if (( ! (NOBUILD || GENINTEG) )) && ! ensure_writable_dir "PKGDEST" "$PKGDEST"; then + plain "$(gettext "Aborting...")" + exit $E_FS_PERMISSIONS + fi -if ! ensure_writable_dir "SRCDEST" "$SRCDEST" ; then - plain "$(gettext "Aborting...")" - exit $E_FS_PERMISSIONS + if ! ensure_writable_dir "SRCDEST" "$SRCDEST" ; then + plain "$(gettext "Aborting...")" + exit $E_FS_PERMISSIONS + fi fi if (( SOURCEONLY )); then -- 2.23.0