{"action":"created","issue":{"url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/15","labels_url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/15/comments","events_url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/15/events","html_url":"https://github.com/drupal-composer/drupal-project/issues/15","id":63281970,"number":15,"title":"Unable to patch drupal itself","user":{"login":"villette","id":1629703,"avatar_url":"https://avatars.githubusercontent.com/u/1629703?v=3","gravatar_id":"","url":"https://api.github.com/users/villette","html_url":"https://github.com/villette","followers_url":"https://api.github.com/users/villette/followers","following_url":"https://api.github.com/users/villette/following{/other_user}","gists_url":"https://api.github.com/users/villette/gists{/gist_id}","starred_url":"https://api.github.com/users/villette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villette/subscriptions","organizations_url":"https://api.github.com/users/villette/orgs","repos_url":"https://api.github.com/users/villette/repos","events_url":"https://api.github.com/users/villette/events{/privacy}","received_events_url":"https://api.github.com/users/villette/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-20T18:49:08Z","updated_at":"2015-07-30T11:06:39Z","closed_at":null,"body":"Hi ! I'm using this method to manage my project and it have been working great until I had to apply a path to Drupal itself.\r\nWith drush make, I would have done something like that:\r\n\r\n```\r\nprojects[drupal][patch][] = \"https://www.drupal.org/files/911354-drupal-profile-85.patch\"\r\n```\r\n\r\nSo I have tried to use the method described in the **Patches** section but I couldn't get it to work, it keeps getting me this error:\r\n\r\n```\r\n  Failing patch detected - reverting already applied patches\r\n\r\n  [Netresearch\\Composer\\Patches\\PatchCommandException]\r\n  Patch 0 would fail!\r\n  Error executing command \"patch -f -p1 --no-backup-if-mismatch -r - --dry-run\":\r\n  can't find file to patch at input line 5\r\n  Perhaps you used the wrong -p or --strip option?\r\n  The text leading up to this was:\r\n  --------------------------\r\n  |diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc\r\n  |index 80563ef..80a7b5a 100644\r\n  |--- a/includes/bootstrap.inc\r\n  |+++ b/includes/bootstrap.inc\r\n  --------------------------\r\n  No file to patch.  Skipping patch.\r\n  1 out of 1 hunk ignored\r\n  can't find file to patch at input line 33\r\n  Perhaps you used the wrong -p or --strip option?\r\n  The text leading up to this was:\r\n  --------------------------\r\n  |diff --git a/includes/common.inc b/includes/common.inc\r\n  |index 31923f2..b722db2 100644\r\n  |--- a/includes/common.inc\r\n  |+++ b/includes/common.inc\r\n  --------------------------\r\n  No file to patch.  Skipping patch.\r\n  1 out of 1 hunk ignored\r\n  can't find file to patch at input line 46\r\n  Perhaps you used the wrong -p or --strip option?\r\n  The text leading up to this was:\r\n  --------------------------\r\n  |diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php\r\n  |index 0853c7d..74acb13 100644\r\n  |--- a/modules/simpletest/drupal_web_test_case.php\r\n  |+++ b/modules/simpletest/drupal_web_test_case.php\r\n  --------------------------\r\n  No file to patch.  Skipping patch.\r\n  1 out of 1 hunk ignored\r\n```\r\n\r\nI am using these plugins in my project:\r\n- azt3k/non-destructive-archive-installer\r\n- netresearch/composer-patches-plugin\r\n- composer/installers\r\n\r\nHere is my composer.json file so you may tell me what's wrong with it (it's not the actual one but it illustrates the problem correctly):\r\n\r\n```\r\n{\r\n  \"name\": \"me/my-project\",\r\n  \"minimum-stability\": \"beta\",\r\n  \"prefer-stable\": true,\r\n  \"repositories\": [{\r\n    \"type\": \"package\",\r\n    \"package\": {\r\n      \"name\": \"drupal/drupal\",\r\n      \"type\": \"non-destructive-archive-installer\",\r\n      \"version\": \"7.35\",\r\n      \"dist\": {\r\n        \"url\": \"http://ftp.drupal.org/files/projects/drupal-7.35.zip\",\r\n        \"type\": \"zip\"\r\n      },\r\n      \"require\": {\r\n        \"azt3k/non-destructive-archive-installer\": \"*\"\r\n      },\r\n      \"extra\": {\r\n        \"target-dir\": \".\",\r\n        \"omit-first-directory\": \"true\",\r\n        \"patches\": {\r\n          \"drupal/drupal\": {\r\n            \"7.35\": [\r\n              {\r\n                \"title\": \"Tests in profiles/[name]/modules cannot be run and cannot use a different profile for running tests\",\r\n                \"url\": \"https://www.drupal.org/files/911354-drupal-profile-85.patch\"\r\n              }\r\n            ]\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }, {\r\n    \"type\": \"composer\",\r\n    \"url\": \"http://packagist.drupal-composer.org/\"\r\n  }],\r\n  \"require\": {\r\n    \"azt3k/non-destructive-archive-installer\": \"0.2.*\",\r\n    \"netresearch/composer-patches-plugin\": \"~1.0\",\r\n    \"composer/installers\": \"~1.0\",\r\n\r\n    \"drupal/drupal\": \"7.35\"\r\n  },\r\n  \"config\": {\r\n    \"vendor-dir\": \"sites/all/vendor\"\r\n  },\r\n  \"extra\": {\r\n    \"installer-paths\": {\r\n      \"sites/all/modules/contrib/{$name}/\": [\"type:drupal-module\"],\r\n      \"sites/all/themes/contrib/{$name}/\": [\"type:drupal-theme\"],\r\n      \"sites/all/libraries/{$name}/\": [\"type:drupal-library\"],\r\n      \"sites/all/drush/{$name}/\": [\"type:drupal-drush\"],\r\n      \"profiles/{$name}/\": [\"type:drupal-profile\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nMy best guess would be that it's an incompatibility between the *non-destructive-archive-installer* plugin and *composer-patches-plugin* because the latter is not aware that the former changes the installation path of the package, but I'm not quite sure."},"comment":{"url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/comments/126274417","html_url":"https://github.com/drupal-composer/drupal-project/issues/15#issuecomment-126274417","issue_url":"https://api.github.com/repos/drupal-composer/drupal-project/issues/15","id":126274417,"user":{"login":"albertvolkman","id":315328,"avatar_url":"https://avatars.githubusercontent.com/u/315328?v=3","gravatar_id":"","url":"https://api.github.com/users/albertvolkman","html_url":"https://github.com/albertvolkman","followers_url":"https://api.github.com/users/albertvolkman/followers","following_url":"https://api.github.com/users/albertvolkman/following{/other_user}","gists_url":"https://api.github.com/users/albertvolkman/gists{/gist_id}","starred_url":"https://api.github.com/users/albertvolkman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertvolkman/subscriptions","organizations_url":"https://api.github.com/users/albertvolkman/orgs","repos_url":"https://api.github.com/users/albertvolkman/repos","events_url":"https://api.github.com/users/albertvolkman/events{/privacy}","received_events_url":"https://api.github.com/users/albertvolkman/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T11:06:39Z","updated_at":"2015-07-30T11:06:39Z","body":"I appreciate the offer, but it won't be necessary. We have a new server build slated to go out in the next few weeks. Thanks @cweagans!"}}