Why not make installation profiles full-blown modules in D7?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
wmostrey's picture

I really like that in Drupal 7 installation profiles will be treated as modules. However now that I started thinking about actual implementations, I'm wondering why they are not actual modules. For instance with DrupalMU the required modules and settings could be deployed both at the moment of installation as at a later date. The required modules and the function calls however would be identical in both cases. So what do I do? Do I make it a module that has a .module and a .profile file that works when dropped in either the sites/all/modules or in the /profiles directory? Should I duplicate the code in both files or should I work with a .inc that gets included in both files?

Why not make installation profiles regular modules that have one specific setting in their .info file? So from the module settings page it functions as any regular module, and upon installation it shows up as an installation profile.

Comments

they are

adrian's picture

sort of.

they are silently loaded, you can't disable them. and they still live in the profiles folder.

but they have access to all the module hooks, and have update_x functions etc.

basically almost every site has a custom module to handle all the overrides.

that is your install profile now. rename it to .profile and move it to the profiles directory.