Could not apply patch! Skipping.

Created on 22 February 2023, over 1 year ago
Updated 6 April 2023, over 1 year ago

Problem/Motivation

Applying patches fails on composer install

Steps to reproduce

Given composer create-project vardot/vardoc-project:5.0.0-beta1 [projectdir] --no-dev --no-interaction
When Applying patches for drupal/core
Then Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2869592-remove-update-warning-7.patch

The issue is apparently caused by the --no-backup-if-mismatch flag in Composer patch on certain OS like for instance FreeBSD
https://github.com/cweagans/composer-patches/issues/159

Proposed resolution

My resolution to circumvent the problem was as follows:
2) composer create-project vardot/vardoc-project:5.0.0-beta1 kb123 --no-dev --no-interaction --no-install
which extracts the project files: Installing vardot/vardoc-project (5.0.0-beta1): Extracting archive

2) Edit composer.json in the project root and disable patching:

   "enable-patching": false,
    "composer-exit-on-patch-failure": true,
    "patchLevel": {
      "drupal/core": "-p2"
    },
    "patches": {}
  }
}

located at the bottom of the composer.json file

3) composer install

4) manually patches from the installer script without the --no-backup-if-mismatch flag. i.e.:
patch '-p2' -d '/var/www/[projectdir]/docroot/core' < '/tmp/2869592-remove-update-warning-7.patch'

Hope this helps!

Remaining tasks

  • ✅ File an issue about this project
  • ❌ Addition/Change/Update/Fix to this project
  • ❌ Testing to ensure no regression
  • ❌ Automated unit/functional testing coverage
  • ❌ Developer Documentation support on feature change/addition
  • ❌ User Guide Documentation support on feature change/addition
  • ❌ Accessibility and Readability
  • ❌ Code review from 1 Vardoc core team member
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes and Update Helper on new feature change/addition
  • ❌ Release

Vardoc update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024