Ran out of time to figure this out. Perhaps jonhattan or Owen can dive in. In the case below, our array of modules is out order because one key in $modules is a string while others are simple integers.

Unless I mistaken, our terminology has gotten confused again. drupal_get_projects() is a combination of drupal_get_modules and drupal_get_themes(). Thats not correct. A project is a container for modules or themes. A project can have several modules in it. For example, migrate module holds migrate.module and migrate_example.module. drupal_get_projects should either rename itself, or not return two entries for this.

Using D7, run these commands

drush si minimal
drush dl migrate (this should start working in a couple hours)
drush en migrate_example -y

Comments

jonhattan’s picture

I think this has been so since a long.

* integer & string keys: requested projects are converted in a assoc array in drush_pm_classify_projects(). Dependencies is an array with integers. Can be converted with drupal_map_assoc() as in

        $all_dependencies = array_merge($all_dependencies, drupal_map_assoc($info['dependencies']));

btw integers &strings doesn't hurt.

* requested projects is *merged* with dependencies and I think the point is to use arary_unshift() to prepend the dependencies instead of merging with requested projects.

    $modules = array_unique(array_merge($modules, array_diff($all_dependencies, $enabled)));

* terminology: We use 'project' as a superclass for a single module or theme,.. in drupal.org a project is a "package" with one or more modules. And modules or themes can be clasified in packages (as 'Core - Required' package), this is not restricted to a given tgz but anyone can do it in a .info file.

I'm not completely happy with terminology but drush inherit from drupal.

moshe weitzman’s picture

Status: Active » Fixed

these changes worked nicely. committed.

we will keep talking about terminology

Status: Fixed » Closed (fixed)

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