首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >编写器未应用修补程序:超过了300秒的超时时间

编写器未应用修补程序:超过了300秒的超时时间
EN

Drupal用户
提问于 2022-12-05 12:59:22
回答 1查看 1.4K关注 0票数 1

自从我更新到新的OSX (Ventura 13)之后,我在使用composer时遇到了问题。最大的问题是,我的补丁没有补丁,结束和超过了超时300秒后一段时间。我没有更改我的composer.json文件或补丁。这只发生在我的本地站点上,远程站点运行顺利。

我试图修复的是更新和重新安装composer。我在运行composer 2.4.4。此刻。

普通的composer updatecomposer install的工作原理是正常的,除非我将补丁添加到composer.json文件中。我被困在补丁里了。

当我执行ctrl+c时,修补程序会被修补,但不会添加到composer.lock文件中。我把它手工添加到锁文件中,让所有东西都能正常工作,但是我想修复这个问题,这样我就不需要黑客就能得到它应该有的所有东西。

我试过composer install -v,但我没有得到任何进展。输出结果如下:

代码语言:javascript
复制
patch '-p1' --no-backup-if-mismatch -d 'public_html/core' < '/var/folders/k0/fk82ww894lvcgdkm2485dyww0000gn/T/638dea49da104.patch'
Executing command (CWD): patch '-p1' --no-backup-if-mismatch -d 'public_html/core' < '/var/folders/k0/fk82ww894lvcgdkm2485dyww0000gn/T/638dea49da104.patch'
File to patch: 
   Could not apply patch! Skipping. The error was: The process "patch '-p1' --no-backup-if-mismatch -d 'public_html/core' < '/var/folders/k0/fk82ww894lvcgdkm2485dyww0000gn/T/638dea49da104.patch'" exceeded the timeout of 300 seconds.

我注意到的另一件事是,自从更新之后,我收到了这样的消息:composer/installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "composer/installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json)

因此,我查看了我的编写器文件,看看是否添加了补丁插件。

代码语言:javascript
复制
"allow-plugins": {
            "composer/installers": true,
            "drupal/console-extend-plugin": true,
            "cweagans/composer-patches": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true
        }

我能做些什么来找出为什么补丁没有运行并且给我一个超时?而S允许的插件部分与此有什么关系吗?

完整的composer.json文件包含:

代码语言:javascript
复制
{
    "name": "drupal-composer/drupal-project",
    "description": "Project template for Drupal 8 projects with composer",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "",
            "role": ""
        }
    ],
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.2",
        "cweagans/composer-patches": "^1.6",
        "drupal/addanother": "^1.1",
        "drupal/admin_toolbar": "^3.0",
        "drupal/advagg": "^4.0",
        "drupal/animated_gif": "^1.1",
        "drupal/antibot": "^2.0",
        "drupal/console": "^1.0.2",
        "drupal/core": "^9.0",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-project-message": "^9",
        "drupal/core-recommended": "^9",
        "drupal/ctools": "^3.0",
        "drupal/devel": "^4.1",
        "drupal/eck": "^1.0@alpha",
        "drupal/editor_advanced_link": "^1.4",
        "drupal/entity_type_clone": "^1.7",
        "drupal/entityqueue": "^1.1",
        "drupal/field_group": "^3.2",
        "drupal/gin": "^3.0@alpha",
        "drupal/gin_login": "^1.0",
        "drupal/gin_toolbar": "^1.0@beta",
        "drupal/honeypot": "^2.0",
        "drupal/httpswww": "^2.0",
        "drupal/login_destination": "2.x-dev",
        "drupal/login_history": "^1.0",
        "drupal/mailsystem": "^4.3",
        "drupal/metatag": "^1.5",
        "drupal/node_view_permissions": "^1.2",
        "drupal/override_node_options": "^2.4",
        "drupal/paragraphs": "^1.5",
        "drupal/pathauto": "^1.2",
        "drupal/rabbit_hole": "^1.0@beta",
        "drupal/recaptcha": "^3.0",
        "drupal/redirect": "^1.3",
        "drupal/redis": "^1.4",
        "drupal/restui": "^1.16",
        "drupal/smtp": "^1.0",
        "drupal/tablefield": "^2.0@alpha",
        "drupal/token": "^1.3",
        "drupal/user_current_paths": "^2.0",
        "drupal/user_restrictions": "^2.0",
        "drupal/video_embed_field": "^2.0",
        "drupal/views_data_export": "^1.0",
        "drupal/views_field_view": "^1.0@beta",
        "drupal/webform": "^6.0",
        "drupal/weight": "^3.3",
        "drush/drush": "^10.3",
        "symfony/var-dumper": "^5.1",
        "vlucas/phpdotenv": "^2.4",
        "webflo/drupal-finder": "^1.0.0",
        "webmozart/path-util": "^2.3"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "sort-packages": true,
        "allow-plugins": {
            "composer/installers": true,
            "drupal/console-extend-plugin": true,
            "cweagans/composer-patches": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true
        }
    },
    "autoload": {
        "classmap": [
            "scripts/composer/ScriptHandler.php"
        ],
        "files": ["load.environment.php"]
    },
    "scripts": {
        "pre-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "pre-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
        ],
        "post-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
        ]
    },
    "extra": {
        "installer-paths": {
            "public_html/core": ["type:drupal-core"],
            "public_html/libraries/{$name}": ["type:drupal-library"],
            "public_html/modules/contrib/{$name}": ["type:drupal-module"],
            "public_html/profiles/contrib/{$name}": ["type:drupal-profile"],
            "public_html/themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/Commands/{$name}": ["type:drupal-drush"]
        },
        "patches": {
            "drupal/core":{
                "Entity reference Fix": "https://www.drupal.org/files/issues/2019-03-26/user_cant_reference_unpublished_content-2845144-24.patch"
            },
            "drupal/token":{
                "Path Alias Language Fix - Token Issue": "https://www.drupal.org/files/issues/2019-03-14/2945272-8-token-language.patch"
            },
            "drupal/rules":{
                "Drupal Rules Fix": "https://www.drupal.org/files/issues/2725525-14.fatal_error_call_to_role_id.patch"
            },
            "drupal/recaptcha":{
                "Drupal Captcha Fix": "https://www.drupal.org/files/issues/2019-11-15/3035883-29-workaround.patch"
            }

        },
        "drupal-scaffold": {
            "locations": {
                "web-root": "public_html/"
            },
            "file-mapping": {
                "[web-root]/sites/development.services.yml": false
            }
        }
    }
}

非常感谢。

EN

回答 1

Drupal用户

发布于 2022-12-05 22:35:13

谢谢你为我指明了正确的方向。对于我来说,这个线程的解决方案423修复了这个问题:https://github.com/cweagans/composer-patches/issues/423#issuecomment-1301026697

在Mike的评论中提出的解决方案是:在这个注意事项上,对我来说,用额外的测试来解决这个问题的方法是通过自制安装gnu补丁。(https://formulae.brew.sh/formula/gpatch) brew install gpatch,它安装GNU补丁2.7.6之后,没有应用补丁程序的问题,包括@dpi失败的补丁

票数 8
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/313956

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档