I have been working on a site with install profiles, and we recently discovered that drush help does not list commands of modules inside install profiles (in this case we have features as part of our install profile. The features commands do not show up in the command list of drush help. Running the features commands, however, work just fine).

CommentFileSizeAuthor
#9 profiles.diff1.6 KBmoshe weitzman

Comments

moshe weitzman’s picture

Version: All-versions-3.0 »
Assigned: Unassigned » moshe weitzman

This is a known problem in 3.x that I introduced with #453866: Massively speed up `help` command. In order to fix it, I need to make the drush bootstrap and _drush_find_commandfiles() more granular. Thats going to have to wait for 4.x

Grayside’s picture

This problem also includes drush drupal-directory--it does not find the existing modules.

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

We need #545452: Store install profile in the generated settings.php file in order to fix this. Other techniques would slow down drush too much.

patcon’s picture

Component: Code » PM (dl, en, up ...)

If anyone is having trouble remembering syntax in this case (but you still remember the command itself, just user drush <command> --help instead of drush help <command> and it should work.

And for the record, (if anyone else is wondering) it seems this is still an issue in 4.4

Cheers

acrollet’s picture

subscribe

moshe weitzman’s picture

#4 is an interesting buglet. Those two syntaxes are intended to be equivalent.

#545452: Store install profile in the generated settings.php file did not get into D7 so I think this has to wait some more.

Grayside’s picture

Would it be reasonable to allow developers to manually add this information, and act on it if not null?

febbraro’s picture

Sub. Having this same issue. Itsa problem for distros.

moshe weitzman’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.6 KB

Attached patch helps out a bit. If settings.php has a variable such as $conf['install_profile'] = 'openatrium';, then commands located within /profiles/openatrium/modules are listed in help. That variable can be set by:

  1. Aegir/Provision already sets it during install
  2. Install profiles may add code similar to http://drupal.org/node/534302 so that their installs are tagged with right profile.
  3. drush site-install could append install_profile to settings.php without too much trouble. No issue yet for that.
  4. Any admin can set this variable in settings.php

Note that setting the variable in the DB is insufficient. drush help never touches the DB.

There are other interesting issues regarding upgrading code in /profiles. This patch does not address those.

Let me know if this patch will be enough for distros.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Committed to master and 4.x. Will be in Drush 4.5

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.