When trying drush dl rdf in a Drupal 7 site, I get:

Unable to download  to /Users/scor/htdocs/d7gitfr/sites/all/modules/ from    [error]
SimpleXMLElement::xpath(): Invalid expression in drush_pm_download() (line 1182 of .../drush-HEAD/commands/pm/pm.drush.inc).   [warning]
SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in drush_pm_download() (line 1182 of .../drush-HEAD/commands/pm/pm.drush.inc).   [warning]
An error occurred at function : drush_pm_download   [error]

Line 1182 corresponds to the last line of:

        // If that did not work, get the first published release for the recommended major version.
        if (empty($releases)) {
          $recommended_major = $xml->xpath("/project/recommended_major");
          $xpath_releases = "/project/releases/release[status='published'][version_major=" . (string)$recommended_major[0] . "]";
          $releases = $xml->xpath($xpath_releases);
        }

Drush should kindly say that there is no 7.x recommended release available for that module (which is the case).

Note that drush dl rdf-7.x-2.x-dev works as expected.

Comments

moshe weitzman’s picture

committed a little work here. more to do.

moshe weitzman’s picture

Status: Active » Fixed

Fixed now. For the RDF module to work you need to name a Recommended Major release for 7.x at http://drupal.org/node/182305/edit/releases.

scor’s picture

Thanks Moshe.

For the RDF module to work you need to name a Recommended Major release for 7.x at http://drupal.org/node/182305/edit/releases.

I know that, and I just wanted to Drush to say it instead of throwing up all over the console. thanks.

Status: Fixed » Closed (fixed)

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

shaneonabike’s picture

What release was this fixed b/c we had a similar problem here?

It would be great if there were an option to download the next available release instead of aborting... just a thought.

scor’s picture

Status: Closed (fixed) » Active

what module is it for? what drush command did you type? That was fixed a while ago. are you using the latest drush 3.0?

moshe weitzman’s picture

Status: Active » Closed (fixed)

fixed in 3.0. reopen with more detail if needed.