When a module is enabled that's part of a bigger project e.g. fieldgroup in the cck project, or when the module has been badly named e.g. google_analytics has a googleanalytics.module file in it, then _drush_generate_makefile() skips over it. This is because of the check at around l50:

 foreach ($project_info as $item) {
   $name = $item->name;
   $type = $item->type;
   if ($item->info['project'] != 'drupal' && $item->info['project'] == $name) {

If the project isn't the same as the module name, nothing happens.

Please find attached a patch to fix this behaviour. This patch does as follows:

* Check if the project and module names are different: if so, mark this as a "subproject"
* Set the project name to be the actual project name
* Only get updatexml on full projects
* Only process the first subproject to extract its parent project data
* Only check the file location if this is a full project (it just gets confused for subprojects.)

This issue will also affect #894440: Enhance generate-makefile to include d.o project version numbers eventually, as it does a check based on $name, which should probably change to $project_name .

Comments

jp.stacey’s picture

Re-rolling patch - manual edits seemed to break it.

jp.stacey’s picture

StatusFileSize
new1.75 KB

Here's a further experiemental patch to get this working with #894440: Enhance generate-makefile to include d.o project version numbers.

dmitrig01’s picture

Yeah, that looks a little more along the lines of what I was thinking. What's an example of a module where this is the case?

dmitrig01’s picture

Status: Needs review » Needs work

Hm, this patch doesn't apply anymore. could you look into it?

peter.walter’s picture

I have this problem when using drush generate-makefile on my site, coincidentally with the same modules mentioned by the OP.

Examples:
modules/cck/content.module
modules/google_analytics/googleanalytics.module

A fix would be appreciated
Peter

rupl’s picture

Another good example would be Ubercart, which contains some submodules nested within several folders

http://git.drupalcode.org/project/ubercart.git/tree

dmitrig01’s picture

Status: Needs work » Fixed

Ok, I committed a modified version of this -- thanks

peter.walter’s picture

Another strange case is the 6.x version of the date module (http://drupal.org/project/date)

The folder structure is

date/date_api.module
date/date/date.module

Therefore in the make-generate output is listed as:

projects[date][subdir] = "date/date"
projects[date][version] = "x.x"

Looking at the 7.x version, it looks like the folder structure is reversed (ie date.module is in date/ and date_api.module is in date/date_api/) so the problem will go away.

Status: Fixed » Closed (fixed)

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