Bug 244626

Summary: Mk/Scripts/do-patch.sh: [patch] Attempt to apply all patches, rather than stopping when one fails
Product: Ports & Packages Reporter: Conrad Meyer <cem>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me CC: ports-bugs
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
slightly modified do-patch.sh none

Description Conrad Meyer freebsd_committer freebsd_triage 2020-03-06 06:49:03 UTC
Created attachment 212181 [details]
slightly modified do-patch.sh

This makes it easier to update ports with huge patchsets (Chrome has 700+ individual patches):

* 'make patch'
*'find work/* -name \*.rej'
* .orig files are prepopulated and only conflicts in .rej files need to be resolved
* Then 'make makepatch' can be used to update the working set.

More of a pain than git rebase, but it beats one-patch-at-a-time.
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2020-04-30 14:14:36 UTC
This only works in simple cases. For example, if the port has one PATCHFILES or EXTRA_PATCHES, and it fails, it will stop there.
I will try to make it better.
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-04-30 14:49:13 UTC
A commit references this bug:

Author: mat
Date: Thu Apr 30 14:48:22 UTC 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

Changes:
  head/Mk/Scripts/do-patch.sh
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2020-04-30 15:11:04 UTC
Thanks Mathieu.