3

I want to create a Drupal installation profile based on an existing one. Is there a way to inherit the parent profile so I don't need to duplicate modules, dependencies, libraries definitions ?

0

You might install https://www.drupal.org/project/protocol distribution because this allow your profile to inherit parent profile.

  • Don't claim it allows something. Either quote a proper part of project page / documentation, or describe how exactly to do it. – Mołot Jan 20 '16 at 9:04
8

Doing some research and testing I found a way to inherit Drupal installation profiles, using drush make (works in Drupal 7).

1) Apply Drupal patch #47 submitted in this topic

projects[drupal][type] = core
projects[drupal][version] = 7.32
projects[drupal][patch][] = https://www.drupal.org/files/issues/drupal-inheritable-profiles-2067229-47.patch

2) Set Drupal "base profile" in your profile.info file. My installation profile will be based in Guardr

name = MyProfile
description = MyProfile
version = 7.x-1.0
core = 7.x
base profile = guardr

3) Execute with Drush the make file of your base profile. Add it to your profile.make:

projects[guardr][type] = profile
projects[guardr][download][type] = git
projects[guardr][download][url] = "git://git.drupal.org/project/guardr.git"
projects[guardr][download][branch] = "7.x-1.14"

drush will download it and then recursively run the make file of the base profile

I found the reference in this blog post

  • It is not completely functional, I found some issues in this implementation. - hook_install is executed in reverse order (it should be executed the base profile first) - variables[] in base_profile.info are not being loaded I will try to improve the patch.. – luciano_s Oct 30 '14 at 11:30
1

To the best of my knowledge, core doesn't provide this functionality.

Profiler might be what you need.

Profiler allows you to quickly and easily create new install profiles, as well as have 'Sub' Install Profiles, where one Install Profile inherits from and extends another Install Profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.