]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
When tripping over a GIT_ var, give a useful error
authorPaweł Zuzelski <pawelz@execve.pl>
Thu, 8 Apr 2021 20:50:36 +0000 (20:50 +0000)
committerPaweł Zuzelski <pawelz@execve.pl>
Thu, 8 Apr 2021 20:50:36 +0000 (20:50 +0000)
Before the script was failing with "package build failed.  no more
info". That was very unhelpful. Hopefully this message will make it more
clear what is wrong and in worst case it will be easier to find which
call to Exit_error exactly interrupted the execution.

builder.sh

index d96c9d1bf0fbaa7afc2d2c0a01f8ee570c98c2e7..428071e3c1cbd41986e4d7988e09462e42f7bfbe 100755 (executable)
@@ -1700,7 +1700,7 @@ build_package() {
        # may be set by user
        unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_TESTING_PORCELAIN_COMMAND_LIST GIT_EDITOR
        # fail if something still set
-       env | grep ^GIT_ && Exit_error err_build_fail
+       env | grep ^GIT_ && Exit_error err_build_fail "One of GIT_* env variables is still set. The builder script needs to be updated to unset that variable. In the meantime, unset it manually."
 
        local specdir=$(insert_gitlog $SPECFILE)
        ulimit -c unlimited
This page took 0.130913 seconds and 4 git commands to generate.