patches to info.yml files are created against the wrong version and don't apply

Created on 18 October 2022, over 2 years ago
Updated 4 March 2024, 12 months ago

Problem/Motivation

At #3290551: Automated Drupal 10 compatibility fixes , the bot has posted a patch which fixes the info.yml file.

However, the patch contains the packaging script comment:

 dependencies:
   - 'drupal:views'
-core_version_requirement: '^8 || ^9'
+core_version_requirement: ^8 || ^9 || ^10
 
 # Information added by Drupal.org packaging script on 2021-01-30
 version: '1.0.1'

The branch it's supposed to apply against doesn't have that comment, and so the patch doesn't apply.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Component

Code

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands bbrala Netherlands

    Think i've fixed this for d11 readiness. But i have not backported that to the d10.

    Thwe change was pretty minimal, think the folowing should be enough.

    Subject: [PATCH] Use source but without .git directory
    ---
    Index: analyzer.sh
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/analyzer.sh b/analyzer.sh
    --- a/analyzer.sh	(revision 61a9315ccc7866b91b3963ad39b6eb59b816dad4)
    +++ b/analyzer.sh	(revision e8cf5467a3a6e3899c779721a98f9c9847aa7c87)
    @@ -35,11 +35,14 @@
     # Add the requested project to this composer environment (${WORKSPACE_NUMBER} is the number of this workspace, ${MACHINE_NAME} is project name, ${COMPOSER_NAME} is the composer name and ${VERSION} is the version).
     cd $CHECKOUT_DIR || exit 1
     
    -COMPOSER_MEMORY_LIMIT=-1 COMPOSER_CACHE_DIR=${CHECKOUT_BASE_DIR}/cache${WORKSPACE_NUMBER} composer --no-interaction --no-progress require drupal/${COMPOSER_NAME} ${COMPOSER_VERSION} 2>> ${WORKSPACE_DIR}/phpstan-results/${MACHINE_NAME}/${MACHINE_NAME}.${VERSION}.phpstan_stderr
    +COMPOSER_MEMORY_LIMIT=-1 COMPOSER_CACHE_DIR=${CHECKOUT_BASE_DIR}/cache${WORKSPACE_NUMBER} composer --no-interaction --no-progress require drupal/${COMPOSER_NAME} ${COMPOSER_VERSION} --prefer-source 2>> ${WORKSPACE_DIR}/phpstan-results/${MACHINE_NAME}/${MACHINE_NAME}.${VERSION}.phpstan_stderr
     
     # Ensure the directory was created where we thought it should be based on the project machine name.
     if [[ -d "$CHECKOUT_DIR/${EXTENTION_TYPE#project_}s/contrib/${MACHINE_NAME}" ]]; then
     
    +  # We prefer source to work around the packaging issues of Drupal.org, but we dont want no .git directories.
    +  rm -rf "$CHECKOUT_DIR/${EXTENTION_TYPE#project_}s/contrib/${MACHINE_NAME}/.git"
    +
       # Set file paths relative to our workspace, so they don't mix up between workspaces.
       php -d sys_temp_dir=$CHECKOUT_DIR -d upload_tmp_dir=$CHECKOUT_DIR ./vendor/bin/drush --root=$CHECKOUT_DIR config-set system.file path.temporary $CHECKOUT_DIR/sites/default/files/temp
    

    So, composer require --prefer-source, then remove the .git directory so we can just work with the code as we always did.

Production build 0.71.5 2024