From patchwork Sat Jun 8 17:36:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 1112506 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Lmmn0kyVz9sBb for ; Sun, 9 Jun 2019 03:37:13 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="U1vnXKc7"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Lmmm6k09zDqx1 for ; Sun, 9 Jun 2019 03:37:12 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=that.guru (client-ip=199.181.239.191; helo=relay0191.mxlogin.com; envelope-from=stephen@that.guru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=that.guru Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="U1vnXKc7"; dkim-atps=neutral Received: from relay0191.mxlogin.com (relay0191.mxlogin.com [199.181.239.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45Lmm30KBgzDqf1 for ; Sun, 9 Jun 2019 03:36:34 +1000 (AEST) Received: from filter001.mxrelay.co (unknown [94.130.183.33]) by relay0191.mxlogin.com (Postfix) with ESMTP id 4C6C5CC70314 for ; Sat, 8 Jun 2019 12:36:32 -0500 (CDT) Received: from one.mxroute.com (one.mxroute.com [195.201.59.211]) by filter001.mxrelay.co (Postfix) with ESMTPS id 88A10100987 for ; Sat, 8 Jun 2019 17:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VwRBYhs41/9BjdJxhcepUIrsUCUstDrXdk4IEfA7S0s=; b=U1vnXKc7VfEg6pL1Ag7bxSuUZO DjNe9YMyfxu7L4DVkGU1ulewDerV9ti4Y31ujXrC2CXde/IOalUc4+hVOyVMi8vOsctziVJ0rxDpA 9XtpPTlvZvzEp4Xb+22LcKS5Zi6krzYQyEi2mLajmcxqc76ld9OQfJ99hOqU8UaEGDlhbPuLAt0t/ tl2pKeF0sYL4x7fdF7mmSMkVlfxHA1nmnXvFdtTENFKpwGtoIAQi7hAPHsSw6RpsviPdrjRw2xhYw tIGYusQh8ALzKI38CMTKtZANAlX6r+646kL+B3/rJshfh9BjYUev7g7oYFRtY3pmOmDNwEdrNNEZ+ fjRouwFQ==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH v3 3/5] docker: *Really* don't require rebuilding if unncessary Date: Sat, 8 Jun 2019 18:36:20 +0100 Message-Id: <20190608173622.6711-4-stephen@that.guru> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190608173622.6711-1-stephen@that.guru> References: <20190608173622.6711-1-stephen@that.guru> MIME-Version: 1.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" In commit 0b5b4e8cb3d0, we modified the docker entrypoint so it would stop exiting whenever requirements changes were detected, instead opting to allow the user to decide if things should be rebuilt or not. Unfortunately the use of the '-e' option for the 'set' builtin means all commands that fail will result in the script exiting. We don't want this here. Fix the issue by temporarily setting '+e' before and after this command, resolving the issue. Signed-off-by: Stephen Finucane Fixes: 0b5b4e8cb3d0 ("docker: Don't require rebuilding if unnecessary") --- tools/docker/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh index 32f7132a..8a8c99a5 100755 --- a/tools/docker/entrypoint.sh +++ b/tools/docker/entrypoint.sh @@ -68,6 +68,7 @@ EOF fi # check if we need to rebuild because requirements changed +set +e for x in /tmp/requirements-*.txt; do if ! cmp $x ~/patchwork/$(basename $x); then cat << EOF @@ -80,6 +81,7 @@ EOF diff -u $x ~/patchwork/$(basename $x) fi done +set -e # check if db is connected if ! test_db_connection; then