Closed (fixed)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
PM (dl, en, up ...)
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
30 Jun 2011 at 08:46 UTC
Updated:
3 Jan 2013 at 06:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
mordonez commentedsame problem
+1 subscribing
Comment #2
chaosmind commentedSame here. blew away my D7 (stupidly in a folder named "drupal-6.17", but was D7.2), left only sites folder behind:
Index of /drupal-6.17
Name Last modified Size Description
Parent Directory -
drupal-7.4/ 28-Jun-2011 17:05 -
sites/ 02-Jun-2010 12:00
Comment #3
30equals commentedgot the same problem except that my site was placed in a folder 'drupal-7.4'
Comment #4
moshe weitzman commentedPerhaps jonhattan or greg can have a look. Does sound critical.
Comment #5
mrharolda commentedSame issue here. Drush 4.4 couldn't update D7.2 to D7.4. After a manual update to D7.4 I now have the same issue updating to D7.7.
Comment #6
rogerpfaffthis is definitely critical. I ran in this error too and it's annoying to find your installation deleted. Much more critical is no reaction to this after 28 days.
Comment #7
federico.bebber commentedsame here, tried also with old builds and get the same scenario.
Comment #8
jonhattanI'm unable to reproduce this.
Ideally we should redefine DRUPAL_ROOT before moving files. It is not possible in php.
A workaround could be to
require_once DRUPAL_ROOT . '/includes/errors.inc'before moving drupal files. That's done at commands/pm/updatecode.drush.inc around line 275.Comment #9
jonhattanDo you have /var/www and /home in different volumes? It seems in my past life I did a patch for this #965878: Cross-volume backup failure. Test that please.
Comment #10
federico.bebber commentedso with drush on same dir and "--backup-dir" seems working.
you where right.
Comment #11
mrharolda commenteddrush up --backup-dir=/var/www/drush_backupfixed it for me too! /home and /var are different volumes, as any Linux user should have.Bumping it back to 'active' since we now have a reason why things don't work.
@jonhattan: I still run 4.4 so I'm not able to test that patch.
Edit: I've installed Drush into /home/user/drush.
Comment #12
jonhattanI've been able to reproduce the error with --backup-dir to a dir in other volume. From this point on I've had have the chance to do something...
The hypothesis in #8:
1. add
require_once DRUPAL_ROOT . '/includes/errors.inc';to drush_pm_updatecode().2. comment out the several occurences of above line in includes/bootstrap.inc. (sadly require_once needs the file to be present in the filesystem even if it has been already included).
3. remove @ from @drush_op('rename'...)
this way we can actually see the error:
... no error!
The error is using drupal's error handler, as it requires a file we've moved out. After a quick look it seems php only allows one error handler, and the last defined overwrite the former. Drupal is defining its error handler and overriding drush's one. Patch attached remediate this situation and indeed fixes this issue, at least in my testbed.
Comment #13
brunorios1 commentedsub
Comment #14
rolfmeijer commentedsubscribe
Comment #15
akanouras commentedsubscribing
Comment #16
msonnabaum commentedRecreated this issue locally and #12 does indeed fix it for me. Looks good.
Comment #17
moshe weitzman commentedok, committed as 6ce34ee.
Comment #18
msonnabaum commentedBackported.
Comment #20
Drave Robber commentedThis hits again.
drush statusanddrush up -d -voutput: http://pastebin.com/TeJZD9iR/varand/homeare on different partitions.Since the last time it worked I have a) reluctantly upgraded Ubuntu to 11.10 :D b) removed Bazaar as I'm not really using it.
Will poke it a bit more but I'm not much of a sysadmin :)
TIA for any suggestions.
Comment #21
Drave Robber commentedsudo pear upgrade drush/drushfixed it. :)Sorry for the fuss - I definitely need more coffee. (or not touching anything serious before 8 a.m.)