Problem/Motivation
Coworker running composer install is getting this error:
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2869592-remove-update-warning-7.patch
[Exception]
Cannot apply patch 2869592 - Disabled update module shouldn't produce a status report warning (https://www.drupal.org/files/issues/2869592-remove-update-warning-7.patch)!This patch doesn't apply to Drupal 8.8.2.
Proposed resolution
remove or update the patch.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3112055-4.patch | 1.02 KB | oknate |
| #2 | 3112055-2.patch | 858 bytes | oknate |
Issue fork lightning_core-3112055
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
oknateComment #3
oknatePhenaproxima says the patch should be rerolled, rather than removed.
Comment #4
oknateHere's a patch that updates the core patch.
Comment #5
oknateHmm, when I run it on my machine, the old patch applies:
but when my coworker runs it it doesn't, and when I try to apply it directly to 8.8.2 tag on in the drupal repo on the 8.8.x branch, it doesn't.
The patches are different:
Comment #6
kentr commentedI'm also experiencing this problem.
In my case, I'm using
vaimo/composer-patches, which chokes on the original patch (2869592-remove-update-warning-7.patch).Bottom line is that the original patch has garbage at the end of it.
For example, note the "Hmm... Ignoring the trailing garbage" line in the output from
patch(run fromdocroot/core):That garbage might be what's causing the patch to fail on the coworker's machine.
Workaround
vaimo/composer-patchesin your project instead ofcweagans/composer-patches.drupal/lightning_core.composer.json.Example code snippet for the project's
composer.json:With this workaround, the broken patch is skipped and
composer installfinishes without errors for me.Update
Might also need to remove this line from your
composer.json."composer-exit-on-patch-failure": true,Composer may install
cweagans/composer-patchesif required by any dependencies, at least with fresh installations.With that line in place, a failure from
cweagans/composer-patchesmay cause composer to abort beforevaimo/composer-patchesever has a chance to run.Comment #7
levsoroka commentedI have also experienced this issue, doing --verbose argument when running composer install/update helped realze that the patch tool was not available on the host. Hence it failed upon the first patch. Not related to the actual patch.
Comment #8
oheller commentedI had a number of patches that I needed to ignore but their location moved from the lightning_core composer.json to the acquia/lightning profile at docroot/profile/contrib/lightning/composer.json.
I had to add exclude those using this in my root composer.json:
If you are having issues ignoring a patch try and find all the locations that are adding it.