Closed (fixed)
Project:
Provision
Component:
Code
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2009 at 01:46 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent
Because 0.2 no longer needs a bootstrapped drupal to act as a platform, we need to replace the functions that the drupal api provides for finding modules and themes :
$data['modules'] = module_rebuild_cache();
$data['engines'] = drupal_system_listing('\.engine$', 'themes/engines');
$data['themes'] = system_theme_data();
This will work fine for the site data, but we need one for the platforms that returns not just for that specific site, but multiple instances of the same modules / themes. (ie: in multiple profiles, in multiple sites directories. etc).
I'm glad to say this is the only thing missing to make 0.2 feature complete with 0.1.
Comments
Comment #1
anarcat commentedWe need to fix this for 0.2.
Comment #2
adrian commentedI've been looking at this recently.
Specifically, we need a provision_system_listing, that gets the listing not just for the entire platform, but per site and install profile too.
The trickiest issue here is that we can't actually INCLUDE the install files to find the highest update number to determine the schema version, we have to write a regexp to parse the function definitions.
But that's mercifully simple.
I've had my eye on some other solutions.
I've started feeling that it might be worth just porting http://api.drupal.org/api/file/includes/graph.inc/7 to drush, and making it pluggable for all the d5 -> d7 platforms. If we want to have the full whiz bang dependency checking stuff. Which i'm not sure we need, we essentially have to determine that we aren't upgrading to a platform with modules with a lower schema version, and that all the modules are available.
One thing that concerns me though is 'side grades' , ie: drupal 5 has workflow-ng , drupal 6 has rules. How the hell do we mark that up on our own.
Comment #3
adrian commentedStarted working on some code for this, here's a snippet i figured out to retrieve the schema_version of the module without needing to include the code. The rest is pretty simple (if we don't factor in dependencies for now)
Comment #4
anarcat commentedComment #5
adrian commentedThis is basically done in HEAD.
for modules at least.
I need to add themes next.
Comment #6
adrian commentedI added theme support for d5, d6 and d7.
I'm currently busy cleaning up the release synch code, so that it can handle the nested import of packages, releases and instances.
The tricky thing that's messing with me a bit is the module visibility, and how they are layered.
once that is done, i'll add some more columns to store the meta-data i am capturing, which will let us do a query on that data to show which platforms are a possible upgrade path.
Comment #7
adrian commentedI added theme support for d5, d6 and d7.
I'm currently busy cleaning up the release synch code, so that it can handle the nested import of packages, releases and instances.
The tricky thing that's messing with me a bit is the module visibility, and how they are layered.
Comment #8
adrian commentedCommitted.
Everything is being retrieved correctly now.