When running update through Drush, I get the same error after the 'Cache cleared' report:
warning: mkdir(): File exists in XXX/drush/includes/drush.inc on line 251. [warning]
You have pending database updates. Please run `drush updatedb` or visit update.php in your browser. [warning]
Drush command could not be completed.
...Then a dump of the HTML from the Drupal default maintenance page...
An error occurred at function : drush_pm_post_update [error]
Line 251 of includes/drush.inc is the return of drush_op($function) (return call_user_func_array($function, $args);)
Not sure if I've screwed up... but the problem could be related to my use of a custom [themed] maintenance page in my site (by tweaking settings.php). I tried to follow the chain of events for running the drush update script (but got a little lost by the time I reached drush_backend_invoke...) but is Drush trying to put the site into maintenance mode during the update and my custom maintenance/offline page kind of screwing the flow up?
Even with this error, workflow is awesomely quicker with Drush, as I only have to run 'updatedb' and I'm done. So huge thanks for continuing with this project as it has made my life hugely easier. However, grateful for any clues on getting round this pretty small problem.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 487990.patch | 860 bytes | jonhattan |
Comments
Comment #1
mlncn commentedRan:
drush updatecodeAlso received a bunch of mkdir errors:
One for each module that was updated.
Then Drush said:
However, the modules all updated, cache cleared had already been announced, everything was in the backup folder... in short, everything appeared to have already worked before the errors started. And a directory already existing hardly sounds like a fatal error, anyway. Moving ahead as if this doesn't matter.
If other people aren't getting this error I can't think what's different in our setup, except using git for version control, which Drush doesn't know about, and so makes the backups.
ben, Agaric
Comment #2
mlncn commentedOh-- possibly related, meant to put in but forgot, it also attempted to update the Zen theme but as noted in #457184: Enable theme updates Drush doesn't update themes yet through updatecode.
Comment #3
miro_dietikerI've reached this mkdir @251 error too with my rockclimbr based drupal software when updating using drush.
It was exactly:
Project admin_menu was updated successfully. Installed version is now 6.x-1.5.
...
Project timeline was updated successfully. Installed version is now 6.x-1.x-dev.
Resulting in:
Cache cleared.
warning: mkdir(): File exists in [warning]
/home/sites/mdp/web/sites/all/modules/drush/includes/drush.inc on
line 251.
...
warning: mkdir(): File exists in [warning]
/home/sites/mdp/web/sites/all/modules/drush/includes/drush.inc on
line 251.
Exactly as many times mkdir warning as modules are getting upgraded.
Looks like checking if the folder already exists would make us all happy.
What i see are sources of this issue:
user@server:/home/www/web/sites/all/modules/drush$ grep -Rn "mkdir" *
commands/pm/updatecode.inc:139: @drush_op('mkdir', $backup_dir, 0777);
commands/pm/updatecode.inc:141: @drush_op('mkdir', $backup_dir, 0777);
commands/pm/updatecode.inc:143: drush_op('mkdir', $backup_dir, 0777);
Should suppress the warning (@ for 143) eventually be one solution? :-S
Comment #4
rsvelko commentedI get these too as of now. Seems harmless. But it annoys.
Comment #5
AdrianB commentedI get these as well. And as others already said, these warnings seem harmless. So right now I'm just ignoring them.
Comment #6
jonhattanI confirm this happen when updating more than one module. And the suggestion of miro_dietiker in comment #3 do fix the problem. Attached is a dummy patch.
Comment #7
miro_dietikerThanks for the patch. To me this looks perfect.
And since there was no objection in suppressing those mkdir warnings, i hope this solution gets committed.
Comment #8
rsvelko commentedyes the patch is RTBC!
I wish I had cvs access... I already maintain several modules...
Comment #9
moshe weitzman commented