I have a drupal 6.16 install at a path resolved by an alias. My alias file looks like this:
<?php
$aliases['store'] = array (
'root' => '/Users/kencooper/Sites/store/www',
'uri' => 'store'
);
?>
When I attempt to use pm-update, I get the following:
$ drush @store pm-update
Initialized Drupal 6.16 root directory at /Users/kencooper/Sites/store/www [notice]
Initialized Drupal site store at sites/default [notice]
Refreshing update status information ...
WD update: Attempted to fetch information about all available new releases and updates. [notice]
Done.
Update information last refreshed: Wed, 07/28/2010 - 12:21
Update status information on all installed and enabled Drupal projects:
Name Installed version Proposed version Status
Administration menu 6.x-1.5 6.x-1.5 Up to date
Drupal core 6.16 6.17 Update available
ImageCache 6.x-2.0-beta10 6.x-2.0-beta10 Up to date
Lightbox2 6.x-1.9 6.x-1.9 Up to date
Skinr 6.x-1.5 6.x-1.5 Up to date
Acquia Prosper 6.x-1.0-beta4 6.x-1.0-beta4 Up to date
Code updates will be made to drupal core.
WARNING: Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt. If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.
Do you really want to continue? (y/n): y
Executing: svn info '/Users/kencooper/Sites/store/www/drupal-6.17' [notice]
Calling mkdir(/Users/kencooper/Sites/store/www/backup, 511)
Calling mkdir(/Users/kencooper/Sites/store/www/backup/modules, 511)
Calling mkdir(/Users/kencooper/Sites/store/www/backup/modules/20100728122058, 511)
Calling rename(/Users/kencooper/Sites/store/www/drupal-6.17, /Users/kencooper/Sites/store/www/backup/modules/20100728122058/drupal)
Updating project drupal ... [notice]
Executing: cd /Users/kencooper/Sites/store/www ; cvs -z6 -dP [notice]
-d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-17 -d drupal drupal
Unable to update drupal from cvs.drupal.org [error]
Updating project drupal failed. Attempting to roll back to previously installed version. [error]
An error occurred at function : drush_pm_updatecode [error]
Rolling back update of Drupal core code ... [notice]
Executing: svn info 'drupal-6.17' [notice]
Calling rename(/Users/kencooper/Sites/store/www/backup/modules/20100728122058/drupal, /Users/kencooper/Sites/store/www/drupal-6.17)
Backups were restored successfully. [ok]
An error occurred at function : drush_pm_update [error]
Command dispatch complete
Examining this in the debugger, I see that the cvs command is successful, and creates a directory called 'drupal' within store/www. The error is registered after line cvs.inc:45 when this directory does not match that of $project['full_project_path'], which is pointing at store/www/drupal-6.17 instead. Looking at the cvs command that is generated, a "-d drupal" argument is created based on the project name, which does not include the version suffix.
Comments
Comment #1
Anonymous (not verified) commentedI had the same problem on my system.
The problem is in the following line:
cvs -z6 -dP -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-17 -d drupal drupal
What happens is that drush tries to run the CVS update against a 'drupal' subdirectory of the site root. This should be the root itself:
cvs -z6 -dP -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-6-17 -d drupal
I attached a patch that fixes this. On my machine all is fine now.
I hope it works for you as well.
Gertjan
Aug 23 2010: Please don't use the patch attached. It contains an error. Use the patch in comment #4 instead;
Comment #2
lsiden commentedI just applied this patch to my install of 6.x-3.3 (the recommended release) but I still have the same problem.
When I run the CVS checkout standalone from the command line:
The command that works is:
With a little more inspection, it seems that drush_pm_cvs in package_handler/cvs.inc: line 131 is getting called with param $release='modjule' and not 'core'. I tried inserting debug_print_stacktrace() (I had to format it in an editor to read it), The problem is that in the array returned by pm_project_filter, ['project_type'] for drupal is set to 'module' and not 'core'. In pm/update_info/drupal_5.inc I found this curious snippet:
Comment #3
Anonymous (not verified) commentedI'm surprised to see /cvs/drupal-contrib in your CVS commands. That should be just /cvs/drupal.
The standalone command you used wasn't complete. It should be
cvs -z6 -dP -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -r DRUPAL-5-23 -d drupal
Please notice I removed the dot at the end of the command. That was a mistake in my patch. I'll post a new patch.
Comment #4
Anonymous (not verified) commentedPlease don't use the patch above. There a small mistake in it.
Use the attached patch instead.
Gertjan
Comment #5
greg.1.anderson commentedYour comment above claims to be modifying the 'checkout' command, but your patch is in the else branch of
if ($cvsmethod == 'checkout'), and therefore only seems to affect cvs commands other than 'checkout'.I tried to execute a command similar to the one you quote above in #3, namely:
However, this gives an error message:
cvs [checkout aborted]: must specify at least one module or directoryI'd say the error message is expected. Seems like you're on to something here, but your patch doesn't quite get us there...
Comment #6
jonhattanIt was fixed recently in #826720: "--drupal-project-rename" doesn't seem to work. So I'll close this. Reopen if necessary.
Here's the trace of a test I did to update drupal-6.15 (from a tgz, not cvs) using cvs package handler. I've already done the same test with a drupal-6.15 cvs copy. It does exactly the same. I think it should do a cvs update :/