Trying to enable textile (7.x-2.0-rc8) using drush (HEAD version) I'm unable to get it working due to the explicit "2.x" dependency.

#drush en textile
Module textile cannot be enabled because it depends on vars  (2.x) but 7.x-2.0-alpha3 is available

To get it to install I had to remove the numeric part of the dependency.

dependencies[] = vars (2.x)

to

dependencies[] = vars

It seems like '2.x' should Just Work, but I'm new to these explicit version dependencies, so maybe someone else could help figure out if this is a drush problem or a core dependencies framework problem.

CommentFileSizeAuthor
#4 fix-vars-dependency.patch789 bytesscarver2

Comments

Anonymous’s picture

I installed the module without to use Drush, and I didn't get any problem.

I actually tried the installation of the module in the following cases:

  1. No versions of the Variables API module was present.
  2. The latest official version of the branch 7.x-1 was present.
  3. The latest official version of the branch 7.x-2 was present.

In the first case, Drupal reported that the module required version 2.x of vars; in the second case, Drupal reported that the module was not compatible with the installed version of the Variables API module; in the third case, Drupal allowed the installation of the module.
It seems to me that the issue is with Drush, with doesn't handle correctly the dependency version used by Drupal 7.

I will try again with my test site I have on the computer I am writing from (HP 110 running Kubuntu 10.10), and see if I get a different result.

jwilson3’s picture

Yes, i definitely believe the issue is with drush, as i've seen this dependency notation used in other modules... and its equally broken.

Anonymous’s picture

Status: Active » Closed (works as designed)

To notice that the Variables API development snapshot (even if it is the branch 2.x) doesn't satisfy the dependency; you need to use one of official releases made for the Variables API module (branch 2.x).

I am changing the status, as the module works at it should.

scarver2’s picture

Status: Closed (works as designed) » Needs review
StatusFileSize
new789 bytes

With declaration of vars (2.x), the dependency is expecting a version of 2.x for the Vars but the intention of the developer was any 2.x version of vars whether it be dev, alpha, beta, or released. I have included a patch which will satisfy the dependency. The proper syntax is vars (>=2.x) which will keep Textile operational as the Vars project matures.

Anonymous’s picture

Status: Needs review » Fixed

I tested "vars (>= 2.x)" and it doesn't work with the module page; I guess Drupal and Drush handle the dependency declarations differently.

I used "vars (> 1.0)" that should work with either.

Status: Fixed » Closed (fixed)

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