question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support multiple patches per package

See original GitHub issue

I’ve been manually patching React Native for quite some time and I love the idea of this tool. It makes extracting a patch so much easier than the manual process I’m used to using.

The one thing that stands in the way of my complete adoption of patch-package is its lack of support for multiple patches upon the same package. I like to separate my patches by concern, and it’d be nice if patch-package allowed a third segment in the patch name that can be customized by the user.

For example, it’d be great if I could split my one mega-patch into the following three patch files:

patches/react-native+0.52.0+babel.patch
patches/react-native+0.52.0+cookies.patch
patches/react-native+0.52.0+scrollview.patch

patch-package could apply the patches in lexically-sorted order. If the order of patch application matters, the user could include a sorting ordinal in the custom third segment, like such:

patches/react-native+0.52.0+00-scrollview.patch
patches/react-native+0.52.0+01-cookies.patch

The trickiest part of this will be excluding existing patches at the time that a new patch is extracted from a package. I’m not entirely sure how to handle that, but I’m also unconvinced that support for multiple patches needs to hinge on first-class support for extracting and isolating multiple patches. For now, if you want to use this power-user feature, you would just need to ensure that each patch is authored on a clean base package.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:42
  • Comments:29 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
DanielRufcommented, Jul 6, 2018

Should similar or same like it is done in https://github.com/cweagans/composer-patches

3reactions
a-eidcommented, Jan 21, 2022

I was looking for some feature similar to this, would love to see it implemented.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Multiple Patch Application - Oracle Help Center
OPatchAuto supports the application of multiple patches. Changes to the OPatchAuto utility as well as its use (specific to multiple patch application) are ......
Read more >
Multiple-Package Baseline Installation
BigFix Patch provides a solution to combine the installation of updates for multiple packages in a baseline into a single task, which can...
Read more >
Installing Multiple Instances of Products and Patches
However, you can install multiple instances of a product if you have a separate installation package for each instance of a product or...
Read more >
How patches are installed - AWS Systems Manager
Amazon Linux 2022 also supports the patch severity level None , which is recognized by the DNF package manager. For custom patch baselines...
Read more >
Using Patch Content - Ivanti
The following graphic illustrates the relationship between content and packages. Typically, a single content item is shared by multiple endpoints on multiple ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found