On the development list we've discussed the idea of making install profiles updatable, and it's been generally well recieved, see this thread: http://lists.drupal.org/archives/development/2006-08/msg00777.html.

Here's a first quick untested rough-in of what we'd need to do.

The main change is that we need to generalize the various schema-related methods beyond modules so they can be used for profiles (and potentially, other types in the future).

Then we tweak the update.php code so it looks for an updatable profile as well as modules.

I'll work on testing and refining, but meantime, anyone more familiar than I am with the install and update code able to look over this? Is the general approach right?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kazim59’s picture

When I applied the patch, and ran update.php, it told me
Fatal error: Call to undefined function install_no_profile_error in includes/install.inc on line 278.
Also Hunk #8 failed while patching update.php. I did those changes manually.

The error resolved when I uninstalled the patch. Somebody review the patch so that I can know if the problems are not specific to me.

From the code, I can see that functions and calls are edited so as to make profiles as 'updatable' objects (not just modules as assumed before).

drumm’s picture

Status: Needs review » Needs work

Looks like it needs work.

nedjo’s picture

Version: x.y.z » 6.x-dev
Boris Mann’s picture

Hmm...yes, this is needed.

moshe weitzman’s picture

is a good idea ... subscribing

Stefan Nagtegaal’s picture

*subscribing*

nedjo’s picture

FileSize
33.73 KB

Here is an updated patch. This aims to make all system items updatable, and adds support for custom system item types.

Coding in process, practically no testing done.

I'm pretty busy with other patches. If anyone was willing to pick this up and run with it, I'd be delighted. Otherwise I'll try to get to it when I can.

nedjo’s picture

Status: Needs work » Postponed

Not for Drupal 6.

catch’s picture

Version: 6.x-dev » 7.x-dev

Great idea, especially if core gets more install profiles.

catch’s picture

Status: Postponed » Needs work
dww’s picture

adrian’s picture

Status: Needs work » Closed (duplicate)

This patch is fully resolved by http://drupal.org/node/509398#comment-1946334

profiles are now first class modules, with EVERYTHING that comes along with it.

.install files, _update_x hooks, fully loaded in the system registry with full access to all hooks.

So unless someone objects, i think we should mark this as duplicate.

dupe of #509398: Install profiles should be modules with full access to the Drupal API and all it entails(.install files, dependencies, update_x)