Active
Project:
Module Builder
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Dec 2011 at 08:20 UTC
Updated:
14 Apr 2015 at 06:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
greg.1.anderson commentedHere is an update that improves on the proof of concept. It is still unfinished, however; the .install and .profile files it generates are untested. After some post-production hand-editing, the output might be useful.
Comment #3
moshe weitzman commentedThis is a pretty large command. I'm inclined to skip it for drush5 and consider for 6. Am willing to discuss it though.
Comment #4
greg.1.anderson commentedIt could go in its own module, like site-upgrade, if it's too large for core. (Maybe taking generate-make with it?) Since it's a new command, it would not break backwards compatibility to put it in 6 and backport to 5 if it does not make it in for Drush-5 stable.
Comment #5
jhedstromLet's postpone this for Drush 6, or move it into its own contrib module.
Comment #6
greg.1.anderson commentedI agree that this should not be committed until after Drush-5 stable goes out. I'm interested in seeing this stay with generate-make, and would prefer to see both stay in core, but am flexible.
Comment #7
greg.1.anderson commentedHere is my latest work-in-progress on this code. The installation profiles I have generated with this produce working profiles that will install a D7 site. Templates for D6 not available yet.
Also included in this patch is an experimental feature that tries to recover the URL to external libraries from a lookup table. I am uncertain about this, however; at a minimum, the lookup table should not live with the Drush code.
Comment #8
greg.1.anderson commentedThis version sorts the dependency list in the .info file into core, contrib and custom extensions.
Comment #9
anybodyReally really great job!
Perhaps we should furthermore write down, what's the purpose of this feature:
- 1:1 Copy of the existing page to install using the installer?
- What are the main problems and how could they be solved? (Libraries, SQL Dumps, other Hardware, ...)
- What should (NOT) be included?
- Configuration options?
This might help in further development. What do you think?
PS: Perhaps this module might give some hints or is worth a combination:
http://drupal.org/project/profiler
Comment #10
fejn commentedLooks really useful, but haven't used this type of thing enough to have a clear idea of what I can expect it to do. Currently:
a) Work on custom D7 sites, & find that I am often making similar installs, so if I could generate a site profile automatically using this tool, it would be really great.
b) Looks like there are 7.x versions of Profiler & some other modules. I'm willing to be a guinea-pig for these efforts, just so long as I have a clearer understanding of what can/should be done with your patch.
Thanks for any clarifications/suggestions
Comment #11
greg.1.anderson commentedYes, you pretty much have the right idea. Regarding the comments in #9, generate profile does not currently attempt to handle generation of configuration code. If you generate modules that capture your site's configuration, for example using features or ctools export bonus, then those modules will become part of your generated profile when you run the generate-profile command. I do not think that generate profile should try to duplicate the functionality of these modules, but it might be interesting to add options to automatically call ctools export bonus to record settings, if it is available.
I'm undecided about the value of profiler. The generate-profile command currently is not good at writing a profile for a site that was generated from a profile. It could be adapted to create a theme that was based on profiler, if decided; this should only be done on request (e.g. via a commandline option).
Comment #12
fejn commentedCreate a theme:
I notice that in the Profiler, there is reference made to being able to specify a theme, but I don't see it as a part of the Profiler Example file. I'll play around with it more, but being able to detect/specify themes to be used in a profile would be a big win. With a "custom theme" option, you might be able to include custom themes in the profile, if you could pick up the 'theme.info' file for it
Comment #13
greg.1.anderson commentedRelated blog post: http://davehall.com.au/blog/dave/2012/09/09/managing-project-installatio...
Sets the theme and configures some blocks. This could probably be done for generate-profile based on the theme and blocks defined in the current site.
Comment #14
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.
Comment #15
joachim commentedThis could go in Module Builder.
Comment #16
greg.1.anderson commentedMoving to module builder, for future consideration there. The code generator used here is similar to, yet different than the one in module builder. I'm not sure if it would be best to leave them separate, or merge them together.
I haven't worked on this for a long time. The patch in #8 worked fine for Drupal 7.x profiles, but needs updating for Drupal 6.x (and 8.x). There may be need for some other enhancements as well, as things may have changed in Drush. I don't think so, though.
Comment #17
joachim commentedQuickest thing would be to create a new Module builder generator for Profiles, that would either wrap around yours, or just have yours as its methods.
We can always think about ways to harmonize it and make it reuse parts of MB later on.
Comment #18
greg.1.anderson commentedCool. I can work on this + drushify integration sometime after Prague -- no time to do it before.
Comment #19
milos.kroulik commentedDo you still plan to work on this issue?
Comment #20
greg.1.anderson commentedIt's not really on my roadmap right now, although I am in theory still interested in it. I am kind of moving away from Drush make, though, so if I did pick this up again, the first thing I would want to do is consider how it might be useful with composer-generate.
It would be great if someone else wanted to pick this up, though.
Comment #21
joachim commentedThere is a profile generator in Module Builder that I added a while back. It's pretty basic so far -- it just creates the .profile and the .install files, so it would need fleshing out.