Bug 244626 - Mk/Scripts/do-patch.sh: [patch] Attempt to apply all patches, rather than stopping when one fails
Summary: Mk/Scripts/do-patch.sh: [patch] Attempt to apply all patches, rather than sto...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-03-06 06:49 UTC by Conrad Meyer
Modified: 2020-04-30 15:11 UTC (History)
1 user (show)

See Also:


Attachments
slightly modified do-patch.sh (1.06 KB, patch)
2020-03-06 06:49 UTC, Conrad Meyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer 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 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 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 2020-04-30 15:11:04 UTC
Thanks Mathieu.