My module has a dependency to specific version of Media module (7.x-2.0-alpha4) and I have specified that in my info file as documented in Writing module .info files (Drupal 7.x) documentation, just like this:

name = mymodule
description = MyModule description.
package = Media

dependencies[] = file_entity
dependencies[] = media (7.x-2.0-alpha4)
dependencies[] = media_internet
dependencies[] = views

When I try to enable my module with it's dependencies drush en -y mymodule, Drush downloads current stable version of media module (7.x-1.5) instead of the specified one and then enabling my module fails because of unmet dependency. I'm doing this on plain Drupal installation v7.34, DevDesktop stack v 2 RC build Mar 18 2015, Drush v7.0.0-alpha9 (from DevDesktop).

I have also tried to specify the version as (2.0-alpha4) and (2.x) - without success.

What am I doing wrong? Thanks for any hints!

2 Answers 2


The Drush download code actually pre-dates this feature; as you have observed, it is not supported.

I have posted a feature request in the Drush issue queue, here:


  • Thanks for the clarification Greg! I'll watch the issue on GitHub as well. Mar 25, 2015 at 12:29

As @greg_1_anderson says, this feature is not supported yet, so such a dependency has to be downloaded and enabled in two steps

drush dl media-7.x-2.0-alpha4
drush en mymodule

Just running drush en -y mymodule will fail on unmet dependency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.