Here's the situation: both modules and core need updates, run drush upc and update the modules but select 'n' when given the option to update core. Drush will try and rollback changes to the modules (backup->rollback()) but the destination directories exist (the module updates were successful) and Drush raises the above error.

The attached patch forces the directory move and clears up the error. However, it makes it difficult to update modules without updating core -- which is essentially what currently happens. The ideal solution would be to offer a --no-core option to pm-updatecode. I'll work on that next...

Comments

mikeker’s picture

StatusFileSize
new2.48 KB

Here's one that adds a --no-core option to pm-updatecode. This gives us the current functionality (update modules only) without the error messages.

greg.1.anderson’s picture

Code looks good. I think this is the best option for correcting this situation (compared, say, to subverting the rollback during abort in one way or another).

Perhaps could use an extra message if user aborts the upgrade of core and causes a rollback ("run again with --no-core to upgrade modules only"). A little annoying, but again, alternatives can potentially be worse.

mikeker’s picture

StatusFileSize
new2.81 KB

Good call.

jonhattan’s picture

Status: Needs review » Fixed
StatusFileSize
new2.81 KB

Committed. @mikeker take care of trailing whitespaces next time, it is against drupal coding standards and in the practical side: git complains!.

Attached is a cleaner patch for the backport.

jonhattan’s picture

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

Sorry about the trailing spaces -- I thought I had Git configured to remove those... Still new to the Git universe!

msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Backported.

Status: Fixed » Closed (fixed)

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