Running

______@webmirror:/opt/drush$ drush @dev up drupal

Gives me

Source directory /var/www/html/cfide is not readable or does not exist.                                         [error]
Project drupal was updated successfully. Installed version is now 6.24.
Backups were saved into the directory /var/www/backup/drupal/20120221193501/drupal.                             [ok]
Backups were restored successfully.   

I found this really odd because the /var/www/html/cfide directory has nothing to do with Drupal. My Drupal root is /var/www/html/

I also found it odd because it says it updated successfully when it fact it did not.

What is "Source directory" in this case?

Also, I just installed drush from a fresh git clone so I should have the most up to date drush.

Comments

ice5nake’s picture

Also note, that I ran this from my user's shell and from a root shell and got that same result. Both my account and root have write permissions on the directory in question.

/var/www/html/cfide is a symlink to /var/www/html/CFIDE if that matters.

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide output of `drush sa @dev --full` and the full --debug output of the `up` call

jonhattan’s picture

Component: Core Commands » PM (dl, en, up ...)
Assigned: Unassigned » jonhattan

re #1. So it seems you have a custom folder in your drupal root (CFIDE) and also a symlink to it (cfide).

It seems this is causing the the problem for core update. See function _pm_update_core() in commads/pm/updatecode.drush.inc.

1.

  // Create a list of directories to exclude from the update process.
  $skip_list = array('sites', $project['path']);
  // Add non-writable directories: we can't move them around.

2.

  // Move all files and folders in $drupal_root to the new 'core' directory
  // except for the items in the skip list
  _pm_update_move_files($drupal_root, $project['full_project_path'], $project['skip_list']);

perhaps we need to add symlinks to $skip_list. Please try removing the symlink and upgrading to verify this is the actual error.

ice5nake’s picture

I got passed this error by adding 'cfide' to the $skip_list array.

Senpai’s picture

Status: Postponed (maintainer needs more info) » Active

Comment #4 is confirmed. If a symlink is found at the root of the drupal site, the 'drush up drupal' command fails. But, by adding the offending symlink's name to the $skip_list array, the command succeeds.

Recommend that all symlinks in the root of the Drupal site be ignored, since Drupal doesn't ship with symlinks, and thus any symlink present had to be added by a user and is thus worthy of ignoramus. Or something like that.

Senpai’s picture

Following up on my own comment #5, I'd be really swell if the drushrc.php file had an overridable $skip_list in it for those sites that place several random directories and/or symlinks at the base of their Drupal sites? Plus, as soon as I found the $skip_list array in my drush scripts, I went to the drushrc file and tried to override it, but it wasn't an available $option.

Also, a drushrc override would be a safer cross-platform approach for Windows users than trying to auto-detect symlinks in the root of the Drupal site, yeah?

jonhattan’s picture

Title: Source directory is not readable or does not exist » pm-updatecode: add symlinks to skip_list
Status: Active » Fixed

Just added symlinks to $skip_list. Shouldn't be a problem in windows.

jonhattan’s picture

Version: » All-versions-4.x-dev
Assigned: jonhattan » msonnabaum
Status: Fixed » Patch (to be ported)
msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Backported.

Status: Fixed » Closed (fixed)

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