From patchwork Thu Aug 22 18:02:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 269130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 5AFD32C00AB for ; Fri, 23 Aug 2013 04:02:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4ACA7936B0; Thu, 22 Aug 2013 18:03:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UfaEqTAEBGqN; Thu, 22 Aug 2013 18:03:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3ACED93B26; Thu, 22 Aug 2013 18:03:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4C5081BF99E for ; Thu, 22 Aug 2013 18:02:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 96FAB8D6A6 for ; Thu, 22 Aug 2013 18:02:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cy-8nVjRQMF3 for ; Thu, 22 Aug 2013 18:02:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by whitealder.osuosl.org (Postfix) with ESMTPS id 32AAF8D10D for ; Thu, 22 Aug 2013 18:02:22 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1VCZCa-00025T-Fv; Thu, 22 Aug 2013 20:01:45 +0200 Received: from arnout by vandecaa-laptop with local (Exim 4.80) (envelope-from ) id 1VCZD3-0005rg-U6; Thu, 22 Aug 2013 20:02:14 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@busybox.net Date: Thu, 22 Aug 2013 20:02:13 +0200 Message-Id: <1377194533-22501-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <5215C738.2070707@lucaceresoli.net> References: <5215C738.2070707@lucaceresoli.net> Subject: [Buildroot] [PATCH] apply-patches: run patch in batch mode X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net If the file to be patched is missing, then `patch' will interactively ask for a file to be patched. This is annoying in e.g. the autobuilders because they have to wait for a timeout instead of failing. Giving the '-t' (batch mode) option to patch fixes this: it will skip the missing file, and return a non-zero exit code. So the build cleanly fails. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Luca Ceresoli --- I actually discovered this during my allyesconfig night build, where I use make -k. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/scripts/apply-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 2995ea9..e9c6869 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -80,7 +80,7 @@ function apply_patch { echo "" echo "Applying $patch using ${type}: " echo $patch >> ${builddir}/.applied_patches_list - ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1