There seems to be an issue with drush downloading distributions (see command line output below). Commons is the only distribution that will download properly, and this error "failed to open stream: No such file directory filesystem.inc:210" does not occur with other modules such as, ds, webform, views, panels, token, etc.
I first encountered the error with drush-4.5, but this output is tested with the latest drush-All-versions-5.x-dev.tar.gz. Error occurs with any regular system user, and drush doesn't allow me to run as root so I don't know if this is a problem for the root user.
This error happens on my dev machine, as well as live servers running various versions of Ubuntu 10.04 and newer, and at least php 5.3.2-1ubuntu4.14. So, is it just me? Is anyone else having this issue?
Thanks,
--Tony
aegir@development ~ % drush --version
drush version 6.0-dev
aegir@development ~ % drush dl openchurch
There are no releases for project openchurch.
Choose one of the available releases for openchurch:
[0] : Cancel
[1] : 7.x-2.x-dev - 2012-Apr-19 - Supported, Development
[2] : 7.x-1.x-dev - 2012-Apr-10 - Development
[3] : 7.x-1.9-beta1 - 2012-Apr-09 - Supported
3
copy(/tmp/drush_tmp_1334890483_4f90cff3115e7/openchurch): failed to open stream: No such file or [warning]
directory filesystem.inc:210
Project openchurch (7.x-1.9-beta1) could not be downloaded to /var/aegir/openchurch. [error]
aegir@development ~ % drush dl openaid
copy(/tmp/drush_tmp_1334890497_4f90d001bfd53/openaid): failed to open stream: No such file or directory [warning]
filesystem.inc:210
Project openaid (7.x-1.0-rc1) could not be downloaded to /var/aegir/openaid. [error]
aegir@development ~ % drush dl julio
copy(/tmp/drush_tmp_1334890514_4f90d0122a149/julio): failed to open stream: No such file or directory [warning]
filesystem.inc:210
Project julio (7.x-1.x-dev) could not be downloaded to /var/aegir/julio. [error]
aegir@development ~ % drush dl panopoly
copy(/tmp/drush_tmp_1334890536_4f90d028322c2/panopoly): failed to open stream: No such file or directory[warning]
filesystem.inc:210
Project panopoly (7.x-1.0-beta2) could not be downloaded to /var/aegir/panopoly. [error]
aegir@development ~ % drush dl openacademy
copy(/tmp/drush_tmp_1334890551_4f90d037ac92a/openacademy): failed to open stream: No such file or [warning]
directory filesystem.inc:210
Project openacademy (7.x-1.0-beta1) could not be downloaded to /var/aegir/openacademy. [error]
aegir@development ~ % drush dl openpublish
copy(/tmp/drush_tmp_1334890597_4f90d065bf7e6/openpublish): failed to open stream: No such file or [warning]
directory filesystem.inc:210
Project openpublish (7.x-1.0-alpha8) could not be downloaded to /var/aegir/openpublish. [error]
aegir@development ~ % drush dl commons
Project commons (7.x-3.x-dev) downloaded to /var/aegir/commons. [success]
Project commons contains 25 modules: commons_answers, commons_core, commons_event, commons_discussion, commons_document, commons_reputation, commons_dashboard, commons_profile, commons_wiki, commons_invite, commons_blog, commons_shoutbox, commons_seo, commons_subgroups, commons_home, commons_admin, commons_poll, commons_notifications, commons_group_aggregator, fbss_custom, commons_status_streams, commons_environs, commons_connect, commons_roots, commons_origins.
aegir@development ~ % rm -rf commons
aegir@development /tmp % drush dl ds
Project ds (7.x-1.5) downloaded to /tmp/ds. [success]
Project ds contains 4 modules: ds_search, ds_extras, ds_forms, ds.
aegir@development /tmp % drush dl webform
Project webform (7.x-3.17) downloaded to /tmp/webform. [success]
aegir@development /tmp % drush dl token
Project token (7.x-1.0) downloaded to /tmp/token. [success]
aegir@development /tmp % drush dl views panels pathauto
Project views (7.x-3.3) downloaded to /tmp/views. [success]
Project views contains 2 modules: views, views_ui.
Project panels (7.x-3.2) downloaded to /tmp/panels. [success]
Project panels contains 4 modules: panels_node, panels_ipe, panels_mini, panels.
Project pathauto (7.x-1.0) downloaded to /tmp/pathauto. [success]
Comments
Comment #2
rar commentedI ran into the same problem with trying out commerce_kickstart.
The problem is a mis-match between what drush expects to find in /tmp and what is actually being written there
For example it would look for ./commerce_kickstart/ but that directory is not there after the download.
Aside: If you add "-v" to the drush command it will tell you more info.
Comment #3
rar commentedI tracked this down further. The core problem stems from the fact that drush does not recognise the distribution as "core" and so looks for /tmp/drush..../packagename instead of /tmp/drush.../packagename-X.Y.Z
This is handled on line 99 in drush/commands/pm/download.pm.inc
For non-core:
When the file is downloaded drush executes a tar -tzf of the downloaded package
which creates the directory /tmp/drush_tmp_1335330227_4f9785b3309bd/commerce_kickstart-7.x-1.6
However, drush/commands/pm/download.pm.inc calls
where $request['full_project_path'] evaluates to
/tmp/drush_tmp_1335330227_4f9785b3309bd/commerce_kickstart
(note the missing -7.x-1.6 at the end of the directory name)
If drush processed the download as "core" then the full_project_path would have evaluated to /tmp/drush_tmp_1335330227_4f9785b3309bd/commerce_kickstart-7.x-1.6 and the dl would have proceeded.
Comment #4
jonhattanFixed in #1476994: Handle change in top-level directory name in fully-packaged distribution tarballs
Comment #4.0
jonhattanSome of my command line output code was outside the code block, moved it inside.