Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot apply patch on ssh chroot environment #592

Open
5 tasks done
dearste opened this issue Sep 17, 2024 · 1 comment
Open
5 tasks done

Cannot apply patch on ssh chroot environment #592

dearste opened this issue Sep 17, 2024 · 1 comment
Labels
bug Inconsistencies or issues which will cause a problem for users or implementors.

Comments

@dearste
Copy link

dearste commented Sep 17, 2024

Verification

  • I have updated Composer to the most recent stable release (composer self-update)
  • I have updated Composer Patches to the most recent stable release (composer update cweagans/composer-patches)
  • I am using one of the supported PHP versions (8.0+)
  • I have searched existing issues and discussions for my problem.
  • My problem is not addressed in the troubleshooting guide.

What were you trying to do (and why)?

run composer install on ssh chroot access.

What happened? What did you expect to happen?

[Exception] Cannot apply patch

Full contents of composer.json

"extra": {
        "magento-force": true,
        "composer-exit-on-patch-failure": true,
        "patches": {
            "mageworx/module-xmlsitemap": {
                "Fix Zend deprecation": "patches/fix-zend-deprecation.patch"
            },
            "brandung/cash-on-delivery-fee": {
                "Fix PHP 8.1 compatibilty for Invoice": "patches/cash-on-delivery-invoice.patch",
                "Fix PHP 8.1 compatibilty for Creditmemo": "patches/cash-on-delivery-creditmemo.patch"
            },
            "mageplaza/magento-2-blog-extension": {
                "Customer creation bug, conflicts with the Amasty checkout module": "patches/blog-amasty.patch"
            },
            "klarna/module-payments": {
                "Conversion from int to string issue": "patches/klarna-payment.patch"
            },
            "klarna/module-backend": {
                "Fix Klarna shipment processing issue": "patches/fix-klarna-shipment.patch"
            }
        }
    }

Full contents of patches.lock.json

{
    "_hash": "747722c7916b3fe444481f2556d7f78bd57a92055d35fbb8c56f7015dcf7fd01",
    "patches": {
        "mageworx/module-xmlsitemap": [
            {
                "package": "mageworx/module-xmlsitemap",
                "description": "Fix Zend deprecation",
                "url": "patches/fix-zend-deprecation.patch",
                "sha256": "bac48416fa16a938f9ee3f0f8750633659299e3b175f69e3aa93653dccce0f95",
                "depth": 1,
                "extra": {
                    "provenance": "root"
                }
            }
        ],
        "brandung/cash-on-delivery-fee": [
            {
                "package": "brandung/cash-on-delivery-fee",
                "description": "Fix PHP 8.1 compatibilty for Invoice",
                "url": "patches/cash-on-delivery-invoice.patch",
                "sha256": "e59184e794397b89207a124a67271c3d5112c9387c8c78316e8d73ee4deacd20",
                "depth": 1,
                "extra": {
                    "provenance": "root"
                }
            },
            {
                "package": "brandung/cash-on-delivery-fee",
                "description": "Fix PHP 8.1 compatibilty for Creditmemo",
                "url": "patches/cash-on-delivery-creditmemo.patch",
                "sha256": "4d7b1f274fdb78e7123a0a364b271e113f097d65d52226ad561d21a072d0630c",
                "depth": 1,
                "extra": {
                    "provenance": "root"
                }
            }
        ],
        "mageplaza/magento-2-blog-extension": [
            {
                "package": "mageplaza/magento-2-blog-extension",
                "description": "Customer creation bug, conflicts with the Amasty checkout module",
                "url": "patches/blog-amasty.patch",
                "sha256": "fa4784fbd6579b20f3ac4d95c9ca15140974b842ca45dda018d0c8342b20cee3",
                "depth": 1,
                "extra": {
                    "provenance": "root"
                }
            }
        ],
        "klarna/module-payments": [
            {
                "package": "klarna/module-payments",
                "description": "Conversion from int to string issue",
                "url": "patches/klarna-payment.patch",
                "sha256": "e0abd304623ac4fb29c0c1cafdce25b83ddba3e00323166ba169d8da79dafc62",
                "depth": 1,
                "extra": {
                    "provenance": "root"
                }
            }
        ]
    }
}

Full output of composer patches-doctor

not available

Full output of relevant Composer command with the -vvv flag added

No patches found for klarna/module-admin-settings
> post-package-install: Magento\InventoryComposerInstaller\Plugin->onPackageChange
> post-package-install: cweagans\Composer\Plugin\Patches->patchPackage
  - Patching klarna/module-payments
    - Downloading and applying patch patches/klarna-payment.patch (Conversion from int to string issue)
      - Downloading patch patches/klarna-payment.patch
      - Found cached patch at /.config/composer/cache/patches/e0abd304623ac4fb29c0c1cafdce25b83ddba3e00323166ba169d8da79dafc62.patch
      - Applying downloaded patch /.config/composer/cache/patches/e0abd304623ac4fb29c0c1cafdce25b83ddba3e00323166ba169d8da79dafc62.patch
      - Applying patch /.config/composer/cache/patches/e0abd304623ac4fb29c0c1cafdce25b83ddba3e00323166ba169d8da79dafc62.patch (depth: 1)
Executing command (CWD): git --version
cweagans\Composer\Patcher\GitPatcher usable: no
Executing command (CWD): git --version
cweagans\Composer\Patcher\GitInitPatcher usable: no
cweagans\Composer\Patcher\FreeformPatcher usable: yes
Required configuration for FreeformPatcher not present. Skipping.

In Patches.php line 288:
                                                                               
  [Exception]                                                                  
  No available patcher was able to apply patch patches/klarna-payment.patch t  
  o klarna/module-payments                                                     
                                                                               

Exception trace:
  at /public_html/deployment/versions/1453573049-7826002453/vendor/cweagans/composer-patches/src/Plugin/Patches.php:288
 cweagans\Composer\Plugin\Patches->apply() at /public_html/deployment/versions/1453573049-7826002453/vendor/cweagans/composer-patches/src/Plugin/Patches.php:361
 cweagans\Composer\Plugin\Patches->patchPackage() at phar:///bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:215
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:150
@dearste dearste added the bug Inconsistencies or issues which will cause a problem for users or implementors. label Sep 17, 2024
@cweagans
Copy link
Owner

What version of git do you have installed in your chroot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants