I am trying to make an installation profile that inherits the commerce kickstart distribution. In order to get this to work, I need to apply a bunch of patches through drush make.
First I have to apply a drupal core patch: http://drupal.org/node/1356276#comment-6654100
However the libraries module also needs to be made aware of the parent installation profile. So it needs to be patched as well.
My make file looks like this:
api = 2
core = 7.x
projects[drupal][type] = core
projects[drupal][patch][] = http://drupal.org/files/1356276-base-profile-d7-38-do-not-test.patch
projects[commerce_kickstart][type] = profile
projects[libraries][patch] = patches/libraries-from-inherited-profiles.patch
The problem is that with this makefile drush will download the libraries module again to sites/all/modules
and patch it there instead of just patching it in its original download location at profiles/commerce_kickstart/modules/contrib/libraries
, thus I end up with the libraries module existing twice within one drupal installation.
The patch file for the libraries module looks like this:
diff --git a/libraries.module b/libraries.module
old mode 100644
new mode 100755
index 687fa29..bcf8824
--- a/libraries.module
+++ b/libraries.module
@@ -66,7 +66,6 @@
*/
function libraries_get_libraries() {
$searchdir = array();
- $profile = drupal_get_path('profile', drupal_get_profile());
$config = conf_path();
// Similar to 'modules' and 'themes' directories in the root directory,
@@ -77,7 +76,8 @@
// Similar to 'modules' and 'themes' directories inside an installation
// profile, installation profiles may want to place libraries into a
// 'libraries' directory.
- $searchdir[] = "$profile/libraries";
+ foreach (drupal_get_profiles(drupal_get_profile()) as $profile)
+ $searchdir[] = drupal_get_path('profile', $profile) . '/libraries';
// Always search sites/all/libraries.
$searchdir[] = 'sites/all/libraries';
How do I tell drush to simply patch libraries within the commerce kickstart directory and not download it again into sites/all
?