I'm the developer of a distribution (http://www.drupal.org/project/openmusicfestival) and am wanting to use Simplytest.me to let potential users test-drive it.
Alas, I use Profiler to build my distribution, and it appears Simplytest doesn't like that -- it chokes once it gets to that point:
Fatal error: require_once() [function.require]: Failed opening required 'libraries/profiler/profiler.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /home/sae64a7a7b06d320/www/profiles/openmusicfestival/openmusicfestival.profile on line 7
To save you the hassle of downloading my distribution, openmusicfestival.profile is reproduced in its entirety below:
<?php
/**
* @file
* Install profile for openMusicFestival. Basically just requires Profiler.
*/
!function_exists('profiler_v2') ? require_once 'libraries/profiler/profiler.inc' : FALSE;
profiler_v2('openmusicfestival');
This is as per the Profiler Example documentation module:
http://drupalcode.org/project/profiler_example.git/blob_plain/HEAD:/prof...
I download Profiler via my makefile with the following lines:
libraries[profiler][download][type] = "get"
libraries[profiler][download][url] = "http://ftp.drupal.org/files/projects/profiler-7.x-2.0-beta1.tar.gz"
This is as per the Profiler README.txt at:
http://drupalcode.org/project/profiler.git/blob_plain/refs/heads/7.x-2.x...
Given my distribution builds properly and installs fine the normal way (Just tried it), it seems the issue has to do more with Simplytest.me.
Any help? Would really like to demo my project with Simplytest, it's super cool.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | simplytest-add_contrib-destination_for_distributions-1925158-2.patch | 3.03 KB | aendra |
Comments
Comment #1
aendra commentedChanging title because I've done a bit more digging...
The following snippet for .profile files provided by Profiler's documentation does not work because it assumes contrib stuff will be installed to profiles/profile_name while the --contrib-destination used by Simplytest.me is sites/all.
My temporary fix to get around this is to use the following:
Comment #2
aendra commentedAh-ha...! No --contrib-destination is set, which means it installs by default everything to sites/all. Having read a few (at times somewhat intense) discussions about "where to put modules used by distributions", it seems the community-standard way is to put all distribution-related modules into profiles/[distribution-name] (See also here). Thus, it makes sense to tell drush to place the resulting modules there and not in sites/all, which is also how the Drupal.org build process does things. Please let me know if my thinking is wrong.
I've thus rolled a patch that simply adds the --contrib-destination flag to each drush call in scripts/sources/type-distribution. Please see attached.
Comment #3
patrickd commentedSorry for the late reply!
That makes sense! I'll give it a try on the staging server first and check whether it breaks anything with other distributions but the patch looks good :)
Also great to see that other people than me are able to understand these ugly shellscripts ;-)
Thank you!
Comment #4
aendra commentedNo worries! I think it should work for any distribution, though make sure to try it with one that has a main makefile that downloads one or more other makefiles (Which are then recursively executed by Drush Make) -- I haven't tried that test case given I haven't looked at too many distribution makefiles and thus don't know of any which are like that.
(Also: Fear not, I've seen *far* uglier shell scripts!)
Comment #5
patrickd commentedOne issue I had with this patch: you forgot the "=" between argument name and the value
Must be --contrib-destination="profiles/$S_PROJECT"
Beside that the patch worked fine, other distributions like commerce kickstart, spark and drupal commons still work and yours does not fail anymore.
Committed, pushed, deployed.
Thanks!
Comment #6
aendra commentedYay! Thanks!
re: = sign -- interesting; now that I look at it, drush make's "help" function is really inconsistent. Via drush help make, all three of these take arguments but are listed totally differently:
--concurrency=<1> ➥ Angled brackets?
--md5=[print] ➥ Square brackets?
--contrib-destination ➥ No brackets, even if the help text says it defaults to sites/all?!
Comment #7
patrickd commentedyour welcome,
yes that was also confusing me at first, probably worth a bug report ;)