From owner-svn-ports-all@freebsd.org Mon May 4 18:01:40 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD0982D5E4F; Mon, 4 May 2020 18:01:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oo1-f65.google.com (mail-oo1-f65.google.com [209.85.161.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49G9fD4jJSz4VvQ; Mon, 4 May 2020 18:01:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oo1-f65.google.com with SMTP id g14so2602295ooa.4; Mon, 04 May 2020 11:01:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=KvDtzwAYwP/wuZSNE/3cWnvCqZ/uJbMwxZ4vXfj42us=; b=C4W5Np48507KDozWFba4oX/uX4j0rB4ZEfAvY8t8VYZSWLRXr1/k6ZV7+MtVDjF0gh Fx0yn1Q774QLH6G9LmVIxyj7w8W5Pud3MgUq0wFKUebkk268kfKLsfits21lMvNU2F0P T9lOzWsl9oKCyva08iPk8OlwyzLYBFXP0x1guLGZaI+UaSmAXscwV4QtxDJgKfPyigQp d98OT3WVlJGY3C8MVtm6xrl8vXXoEiYFGqUs6aF7wlZ1r9V/m/uFTqDoRHnUfeGgQxgb 4qnfzxXjTEFlcP8h145/CB8qRXEwMvARuP8nY332UPlwN2xGhuvX/BYWLjSKqi5S42nk Svmw== X-Gm-Message-State: AGi0PubjjDM3q5bS4CUKJIbDer1OSsGV4/j9E7AKHlMkCl6/OL2nqgnP tHy5zfIpPth5EYeZzVzP4f3LNGTL X-Google-Smtp-Source: APiQypI3Ny8veGADRJQeyoQCQUL8Rw6B2+GptRFJtbYTnrfmClMjk90CEmKBAIRt7Iobo2O+OE7+NQ== X-Received: by 2002:a4a:7011:: with SMTP id r17mr15895402ooc.17.1588615297667; Mon, 04 May 2020 11:01:37 -0700 (PDT) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com. [209.85.210.53]) by smtp.gmail.com with ESMTPSA id s10sm3353610otd.69.2020.05.04.11.01.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 May 2020 11:01:37 -0700 (PDT) Received: by mail-ot1-f53.google.com with SMTP id g19so9706499otk.5; Mon, 04 May 2020 11:01:37 -0700 (PDT) X-Received: by 2002:a9d:2c08:: with SMTP id f8mr15514505otb.135.1588615296981; Mon, 04 May 2020 11:01:36 -0700 (PDT) MIME-Version: 1.0 References: <202004301448.03UEmMwc053196@repo.freebsd.org> <276aef88-4619-b4b7-ee92-44999b5c787d@FreeBSD.org> In-Reply-To: <276aef88-4619-b4b7-ee92-44999b5c787d@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 4 May 2020 11:01:26 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r533459 - head/Mk/Scripts To: Bryan Drewery Cc: Mathieu Arnold , ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49G9fD4jJSz4VvQ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 18:01:40 -0000 Hi Bryan, On Mon, May 4, 2020 at 10:49 AM Bryan Drewery wrote: > > On 4/30/2020 7:48 AM, Mathieu Arnold wrote: > > Author: mat > > Date: Thu Apr 30 14:48:22 2020 > > New Revision: 533459 > > URL: https://svnweb.freebsd.org/changeset/ports/533459 > > > > Log: > > When one patch fails, continue with appling patches. > > > > This makes the process of make patch, fix fallout, make makepatch much > > easier as only one iteration is required. > > > > While there, refactor things around, and streamline messages passed > > between functions. > > > > PR: 244626 > > Reported by: cem > > > > Will this fail between stages? If a files/patch-* patch fails it should > not move on to extra patches as then makepatch / diffing will be wrong. > Even patch-* can lead to being wrong when considering local (not in > ports tree) patches. > > I don't think this is good default behavior. The version of this I submitted aborted at the end of patch_from_directory() if any patches failed for that invocation. It didn't do this 'has_failed' mechanism. So it would've stopped between various stages, I think. I think ports' crazy patching behavior is complicated enough without worrying about random out-of-tree non-conformant patches. I don't know about default behavior or not. I found this essential when updating Chromium (700+ patches, majority conflicting) across major versions; one patch at a time would've been impossible. Not every port is chromium, though. Best, Conrad > > --- head/Mk/Scripts/do-patch.sh Thu Apr 30 14:47:59 2020 (r533458) > > +++ head/Mk/Scripts/do-patch.sh Thu Apr 30 14:48:22 2020 (r533459) > > ... > > @@ -73,24 +83,29 @@ patch_from_directory() { > > for i in patch-*; do > > case ${i} in > > *.orig|*.rej|*~|*,v) > > - ${dp_ECHO_MSG} "===> Ignoring patchfile ${i}" > > + ${dp_ECHO_MSG} "====> IGNORING patchfile ${i}" > > ;; > > *) > > if [ -n "${dp_PATCH_DEBUG_TMP}" ]; then > > - ${dp_ECHO_MSG} "===> Applying ${msg} patch ${i}" > > + ${dp_ECHO_MSG} "====> Applying ${msg} patch ${i}" > > fi > > - if do_patch ${dp_PATCH_ARGS} < ${i}; then > > + if cat_file "$i" | do_patch ${dp_PATCH_ARGS}; then > > patches_applied="${patches_applied} ${i}" > > else > > - ${dp_ECHO_MSG} "=> ${msg} patch ${i} failed to apply cleanly." > > - if [ -n "${patches_applied}" -a "${dp_PATCH_SILENT}" != "yes" ]; then > > - ${dp_ECHO_MSG} "=> Patch(es) ${patches_applied} applied cleanly." > > - fi > > - false > > + ${dp_ECHO_MSG} "====> FAILED Applying ${msg} patch ${i}" > > + patches_failed="${patches_failed} ${i}" > > fi > > ;; > > esac > > done > > + > > + if [ -n "${patches_applied}" -a "${dp_PATCH_SILENT}" != "yes" ]; then > > + ${dp_ECHO_MSG} "===> Cleanly applied ${msg} patch(es) ${patches_applied}" > > + fi > > + if [ -n "${patches_failed}" -a "${dp_PATCH_SILENT}" != "yes" ]; then > > + ${dp_ECHO_MSG} "===> FAILED to apply cleanly ${msg} patch(es) ${patches_failed}" > > + has_failed=1 Mine aborted here ^^^. > > + fi > > fi > > fi > > }