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?
Comment | File | Size | Author |
---|---|---|---|
#7 | profiles-updatable.patch | 33.73 KB | nedjo |
install-profile-updates.patch | 17.83 KB | nedjo | |
Comments
Comment #1
kazim59 CreditAttribution: kazim59 commentedWhen 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).
Comment #2
drummLooks like it needs work.
Comment #3
nedjoComment #4
Boris Mann CreditAttribution: Boris Mann commentedHmm...yes, this is needed.
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedis a good idea ... subscribing
Comment #6
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commented*subscribing*
Comment #7
nedjoHere 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.
Comment #8
nedjoNot for Drupal 6.
Comment #9
catchGreat idea, especially if core gets more install profiles.
Comment #10
catchComment #11
dwwMarked #509400: Introduce .install files for install profiles duplicate of this.
Comment #12
adrian CreditAttribution: adrian commentedThis 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)