Hi,
I am bothered by the fact that the project's name is google_analytics - with an underscore.
And the module's name is googleanalytics - without it.
So when I "drush dl google_analytics" all is fine , but when I try to "drush enable google_analytics" I get an error...
Is it possible that you rename all files in the CVS repo from googleanalytics to google_analytics ?
I can help with the exact commands for that.
Comments
Comment #1
hass commentedThis would break the .install file and all version numbers. I thought some times about this rename, but haven't done it. I believe it's easier to rename the folder, but we also loose the CVS history and I know it may take months to find someone to move it for us.
Comment #2
buddaSee http://drupal.org/node/367355 for the rule about module names not containing an underscore. if anything, the directory/project name would have to be changed.
Comment #3
hass commentedThis seems not correct, see http://drupal.org/node/367355#comment-1233292.
If a submodule is used you need to use underscores and you should always prefix your submodules with the main directory name to prevent collisions with other modules. See xmlsitemap (xmlsitemap_node, xmlsitemap_user) and nodewords (nodewords_basic, nodewords_extra) and others... what also brings us back to rsvelko... If you install a module wiht drush having submodules you may always need to know it's names.
Comment #4
shark commentedI also got confused when
drush dl google_analyticsworked but
drush enable google_analyticsdidn't.
If changing the name of the actual project / module (adding an underscore) is too hard, my vote is to change the directory name to googleanalytics. I think Drush is becoming quite popular and this functionality will be increasingly important.
Comment #5
hass commentedHow do you enabe xmlsitemap submodules and views or cck? I do not see differences... :-)
Comment #6
hass commentedMoving to drush to get some more ideas about this problem.
Comment #7
moshe weitzman commenteddrush dl takes a projct name as defined by project node on drupal.org. drush enable takes the name of a module (not a project). hope that helps.
Comment #8
rsvelko commentedI have an enhanced version (via a bash wrapper) of drush dl - that at the end scans the project's folder and gets all .module files and offers a prewritten dr enable command with their names... This does the trick - especially for multi-submodules...
So although that having googleanalytics is not the best practice - a patch to "drush dl" would make this unimportant.
Imagine this scenario:
---------
# drush dl project1 .... download ok...
# Which modules from project1 do you want to enable ? Press the corresponding characters with commas if more than one:
a - all
1 - module_name1
2 - module2
...
Enter numbers: 1,3,6
Doing a:
drush enable module_name1 ....
(drush enable's output ...)
ready
---------------
Comment #9
moshe weitzman commentedNifty. We could use some kind of multiple choice variant of drush_choice(). enabling a bunch of modules, one by one, is expensive.
Comment #10
greg.1.anderson commentedYes, I agree with #8 and #9.
In addition, although I haven't looked at the code, I imagine that if drush dl can be smart enough to offer to enable the right module names, couldn't drush en also be smart enough to figure out what the module name should be if someone enters in a project name (presuming that the arg cannot be found as a module name, but can be found as a project name)?
Both techniques would be helpful.
Comment #12
AdrianB commentedSubscribing. (I got hit by this googleanalytics/google_analytics issue in Drush. Not a big issue since I know where to look, but always annoying when modules uses other names than d.o. project path name when you're used to the ease of Drush.)
Comment #13
kotnik commentedSubscribing.
Also, this is affected by seo_checklist/seochecklist.
Comment #14
owen barton commentedI have added an API function that could to the multiple selection mentioned in #9 over at #1007578: Add the ability to enter a csv list of items to drush_choice_multiple