Since the installation system has been re-factored (and is going through a more few changes) so that it can now be invoked programmatically, it makes sense to take advantage of that.
The idea of using a core installer "script" has been around for a long time and is the only way to allow radical changes to the installer/system to be tested. Since PIFR will download and patch the code before installing it we will no longer have to disable it when such changes are made.
I have closed #330504: Create auto-install script since it now seems out of date.
Comments
Comment #1
boombatower commented#524728: Refactor install.php to allow Drupal to be installed from the command line
Comment #2
boombatower commentedSo what I need to do is get a D7 install, and simpletest module enabled. I'll take a look at the code, but if there are those who already know that would be great.
Comment #3
boombatower commentedUpdated http://drupal.org/node/366978 and related issues.
Comment #4
Jaza commentedsubscribe
Comment #5
David_Rothstein commentedAssuming the latest code at #524728: Refactor install.php to allow Drupal to be installed from the command line goes in, the code for PIFR would look something like this:
That should get Drupal installed. Enabling the Simpletest module might be a bit different, since the install_drupal() function only has whatever functionality installation profiles provide, and core doesn't have any profiles that ship with Simpletest already enabled.
If you were running this as a separate PHP process, then it could probably be done just by calling
drupal_install_modules(), but I assume that's not what you're going for. So it seems like this needs a little more thought for this API to be able to work inside an already-existing Drupal installation. Hm.Comment #6
boombatower commentedYea, another option would be for PIFR to insert a file in the checkout D7 directory and run it.
Comment #7
boombatower commentedLooks like things are finally ready to be used this way http://arancaytar.ermarian.net/2009/12/17/install-drupal-7-script.
Hooray!
Comment #8
David_Rothstein commentedThat blog post is a great summary, but nothing has changed recently... it's been ready all along :)
Still seems like there will be problems with including a D7 script inside D6 (since function names will conflict). Not sure how to handle that except by running it as a separate PHP process, which might get messy.
I've also wondered a bit whether focusing efforts on #630446: Allow SimpleTest to test the non-interactive installer makes more sense? PIFR currently does a great job testing the web-based installation, and that is certainly something we don't want to stop testing. So if PIFR sticks to running the web-based installer but SimpleTest itself can try out different programmatic installations, maybe that is the best way to cover everything, rather than trying to change PIFR.
Comment #9
boombatower commentedYea, I was thinking about that and I belive it makes the most sense for SimpleTest to test the web installer. If nothing has changed (the format is newer then the last time I tried it), then it won't work, but from looking at it it looks a bit better.
My thought was to just generated a file with the array and include for installer code and just dumb in checkout directory along with d7 then just run it. The key benefit is that the installer interface can be changed without pifr having to be updated. Of course for d6 it will still need to perform the web installer.