Howdy. Using Drush 4.5 I can't get any modules or Drupal itself to update. What happens is the update process seems to go fine, and then after immediately saving modules to backup it auto-restores them, for no apparent reason. I'm attaching the debug output of my drush up command.

CommentFileSizeAuthor
debug.txt105.45 KBlpeabody

Comments

bkosborne’s picture

I'm getting the same problem...

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Starting to update DraggableViews code at sites/all/modules/draggableviews...                                                                                [notice]
Executing: svn info '/Users/bosborne/projects/newsite/www/sites/all/modules/draggableviews'
Executing: bzr root '/Users/bosborne/projects/newsite/www/sites/all/modules/draggableviews'
Executing: mkdir '/Users/bosborne/drush-backups/newsite_local/20120206152641'
Executing: mkdir '/Users/bosborne/drush-backups/newsite_local/20120206152641/modules'
Executing: wget -P . 'http://ftp.drupal.org/files/projects/draggableviews-7.x-2.x-dev.tar.gz'
Executing: curl -O 'http://ftp.drupal.org/files/projects/draggableviews-7.x-2.x-dev.newsitetar.gz'
Downloading draggableviews-7.x-2.x-dev.tar.gz was successful.                                                                                                [notice]
Md5 checksum of draggableviews-7.x-2.x-dev.tar.gz verified.                                                                                                  [notice]
Executing: tar -C '/Users/bosborne/projects/newsite/www/sites/all/modules' -xzf 'draggableviews-7.x-2.x-dev.tar.gz'
Executing: tar -tf 'draggableviews-7.x-2.x-dev.tar.gz'
Project draggableviews was updated successfully. Installed version is now 7.x-2.x-dev.
Backups were saved into the directory /Users/bosborne/drush-backups/newsite_local/20120206152641/modules/draggableviews.                                 [ok]
Rolling back update of DraggableViews code ...                                                                                                               [notice]
Executing: svn info 'sites/all/modules/draggableviews'
Executing: bzr root 'sites/all/modules/draggableviews'
Backups were restored successfully.                                                                                                                       [ok]
Command dispatch complete                                                                                                                                    [notice]

Happens with all modules/core

JamesAn’s picture

Status: Active » Closed (duplicate)

This seems to be fixed in the 5.x-dev version. In the meantime, there's a workaround suggested at #1196972-39: Drush pm-update (up) rollbacks changes if fetching updates fails to run the update with no backups:

drush upc --no-backup

lpeabody’s picture

Status: Closed (duplicate) » Active

Still doesn't work, I now end up with this error output:

Destination directory /var/www is not writable.                                                                                                                         [error]
md5_file(/var/www/drupal-7.8drupal-7.12.tar.gz): failed to open stream: No such file or directory drush.inc:785                                                         [warning]
File drupal-7.12.tar.gz is corrupt (wrong md5 checksum).                                                                                                                [error]
Updating project drupal failed. Attempting to roll back to previously installed version.                                                                                [error]
steinmb’s picture

Version: 7.x-4.5 » 8.x-6.x-dev
Priority: Critical » Major

Still a problem that keeps popping up in various sites. One of my sites was having problem with this but turning off Check for updates of disabled modules and themes allowed me to avoid running drush with --no-backup that is a bit dangerous then it does not run updatedb.

Problem

Looks like the problem is caused by drush failing to find a release history to on the modules on your site, even if your are not planning to update that one.
Failed to get available update data for one project. [error]
drush updates the module(s) and then automatically rolls it back, throwing no apparent errors and claiming the module(s) your where trying to update is now up2date. That is if you are not reading the drush output closely, where it actually tell you that it rolled back the prev. version.

seanr’s picture

I ran into this due to the metatags -> metatag renaming. Renaming projects should really be strongly discouraged due to issues like this.

andrewmacpherson’s picture

Further information related to #4...

I have a dev site where Check for updates of disabled modules and themes was already turned off, but I still experienced the auto-restore behaviour.

It also occurs when the site has Features modules, which are not using a Features server (i.e. no value in "URL of update XML").

I expect this will also affect any custom modules where release history cannot be checked, not just exported features.

seanr’s picture

Re #6, this can happen if your features modules are including d.o style version information (version = "7.x-2.6"), project, etc in their info files. If you remove all of the lines added by the packaging script, drush won't try to check for updates for those modules.

pianomansam’s picture

@seanr, your provided solution works, but doesn't seem to be a good long-term solution as we have to comment out those lines each time we create a new feature. There has to be a better way.

seanr’s picture

You sure about that? When I generate a new feature from scratch, I don't get the extra drupal.org packaging lines. It only adds the ones required for a module, plus any dependencies and features items.

pianomansam’s picture

The offending line I keep having to comment out from newly created features is the "project" line.

greg.1.anderson’s picture

Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.