diff options
author | rillig <rillig@pkgsrc.org> | 2006-10-21 11:42:25 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-10-21 11:42:25 +0000 |
commit | 837c83c041c1ea4c97566a983efd147b47c78aca (patch) | |
tree | 183e33b5d1ed0cf0f5da1d12ccb5299bc9043bd4 /mk/wrapper/wrapper.sh | |
parent | d803961ee92a4e42af3cebf4981293e274c3e8d0 (diff) | |
download | pkgsrc-837c83c041c1ea4c97566a983efd147b47c78aca.tar.gz |
Fixed the "inconsistent update" problem when using the pkgsrc wrapper
cache together with MAKE_FLAGS=-j. The cache file is now regenerated
into a temporary file and then renamed (atomically) to the "real" cache
file.
Fixed some code that would fail when run in "set -e" mode. If you want to
test the "set -e" mode, just uncomment the line in wrapper.sh.
Diffstat (limited to 'mk/wrapper/wrapper.sh')
-rw-r--r-- | mk/wrapper/wrapper.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/wrapper/wrapper.sh b/mk/wrapper/wrapper.sh index e1e37042496..588a2524089 100644 --- a/mk/wrapper/wrapper.sh +++ b/mk/wrapper/wrapper.sh @@ -1,6 +1,6 @@ #! @WRAPPER_SHELL@ # -# $NetBSD: wrapper.sh,v 1.5 2005/01/18 17:25:13 jlam Exp $ +# $NetBSD: wrapper.sh,v 1.6 2006/10/21 11:42:25 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,6 +36,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +#set -eu + arg_pp="@_WRAP_ARG_PP@" arg_pp_main="@_WRAP_ARG_PP_MAIN@" arg_source="@_WRAP_ARG_SOURCE@" @@ -60,6 +62,7 @@ append_extra_args=yes cat="@CAT@" echo="@ECHO@" expr="@EXPR@" +mv="@MV@" sed="@SED@" test="@TEST@" Xsed="$sed -e 1s/^X//" @@ -78,6 +81,8 @@ original_cmd="$0 $@" msg_log $wrapperlog "[*]" $original_cmd cmd="@WRAPPEE@" +libs="" +rellpath="" do_transform=yes init_queue argbuf init_queue cmdbuf @@ -111,8 +116,8 @@ cmd="$cmd $libs" @_WRAP_ENV@ msg_log $wrapperlog "<.>" $cmd -eval $cmd -wrapper_result=$? +wrapper_result=0 +eval "$cmd" || wrapper_result="$?" . $cleanup |