Closed (duplicate)
Project:
Drush
Component:
PM (dl, en, up ...)
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2010 at 20:34 UTC
Updated:
2 Aug 2011 at 16:55 UTC
Jump to comment: Most recent file
pm-download goes through some pains to insure that it can mv or rename or rsync the file, but backing up a project directory does not.
if (!drush_op('rename', $project['full_project_path'], $backup_target)) {
return drush_set_error('DRUSH_PM_BACKUP_FAILED', dt('Failed to backup project directory !project to !backup_target', array('!project' => $project['full_project_path'], '!backup_target' => $backup_target)));
}
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | drush-965878.patch | 868 bytes | jonhattan |
| #1 | drush-965878.patch | 1.02 KB | jonhattan |
Comments
Comment #1
jonhattanThat is the backup version control engine. It is used by pm-updatecode but not by pm-download. Anyway it seems it is enough to switch to drush_move_dir(). untested.
Comment #2
jonhattanComment #3
greg.1.anderson commentedYes, that's simple enough all right, and works perfectly.
Comment #4
jonhattanComitted.
Comment #5
jonhattanComment #7
rolfmeijer commentedWhen upgrading Drupal Core, the directory could not be moved. Moving the backup directory to the same volume resolved my issues. (See #1094366: update drupal core fails because the temporary files can’t be moved.)
I guess re-opening is appropriate?
Comment #8
monotaga commentedI'm confused on this one. I'm getting the same error that rolfmeijer is over in #1094366: update drupal core fails because the temporary files can’t be moved:
Running "drush up" with "--backup-dir=/this/dir" was a workaround, but isn't this still an issue that needs fixed?
My server situation is RHEL 6 with Drush 4.4 AND automounted user folders (which is why I'm guessing I'm getting this error [ie. #1094366: update drupal core fails because the temporary files can’t be moved]).
rolfmeijer, you reopened this. Are you using drush 5.x-dev or 4.4?
Comment #9
rolfmeijer commentedI’m using 5.x-dev
Comment #10
jonhattanFrom drush_move_dir():
Perhaps changing this nasty @ to a try/catch may help. Patch attached. Untested.
ps. there's no try/catch/else construct for php? of course python has ;) http://docs.python.org/whatsnew/2.5.html#pep-341
Comment #11
jonhattanThe patch
Comment #12
brunorios1 commented+1
Comment #13
moshe weitzman commentedLooks good. If you tested the failure scenario and it works as expected, then this is RTBC. Thanks jonhattan.
Comment #14
jonhattanI was able to reproduce this error and found a proper solution. See #1204862: drush up can't update D7 because of drupal error handler intervention..
marking this one as duplicated of the other.