I recently started having issues with the pm-update and related commands (pm-updatecode)

I'm calling drush using shell_exec the following way

php /path/to/drush.php pm-update --root=/path/to/drupal --php=/usr/bin/php -y -d

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.23 sec,    [bootstrap]
3.84 MB]
Initialized Drupal 6.19 root directory at                               [notice]
/path/to/drupal [0.27
sec, 4.74 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.29 sec,    [bootstrap]
4.75 MB]
Initialized Drupal site default at sites/default [11.86 sec, 5 MB]      [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()      [bootstrap]
[11.88 sec, 5.18 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [11.91    [bootstrap]
sec, 5.2 MB]
Successfully connected to the Drupal database. [11.91 sec, 5.2 MB]   [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [11.97 sec,   [bootstrap]
5.6 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [13.05 sec,  [bootstrap]
27.77 MB]
Found command: pm-update (commandfile=pm) [13.07 sec, 27.76 MB]      [bootstrap]
Including                                                            [bootstrap]
/path/to/drush/commands/pm/updatecode.pm.inc
[13.07 sec, 27.8 MB]
Refreshing update status information ...
Drush command could not be completed. [21.28 sec, 31.26 MB]          [31;40m[1m[error][0m

Interestingly enough, this happens to sites that I have duplicated from the same codebase + db dump. I tried to issue pm-refresh and it worked fine without errors and I figured it had to do with "Refreshing update status information ...".

I looked to drupal api function update_refresh which should return an array of project update information, I suspect it is not doing that when drush calls it therefore stops the pm-update command.

I have done several things including re-installing the update status module, re-set the drupal variable drupal_private_key and this was still not resolved.

Interestingly enough I have a fresh installed site where the pm-update command is working perfectly with almost same configuration as the other ones.

It would be much appreciated if you can point me to the right directions.

p.s. below is my drush status info

 Drupal version         :  6.19                                                 
 Site URI               :  http://default                                       
 Database driver        :  mysqli                                               
 Database hostname      :  mysql_host_string                
 Database username      :  mysql_username                                 
 Database name          :  mysql_dbname                                         
 Database               :  Connected                                            
 Drupal bootstrap       :  Successful                                           
 Drupal user            :  Anonymous                                            
 Default theme          :  garland                                              
 Administration theme   :  root_candy                                       
 PHP configuration      :  /etc/php.ini                                         
 Drush version          :  3.3                                                  
 Drush configuration    :                                                       
 Drupal root            :  /path/to/drupal                                      
 Site path              :  sites/default                                        
 File directory path    :  sites/default/files       

Comments

jonhattan’s picture

Component: Code » PM (dl, en, up ...)
Status: Active » Closed (cannot reproduce)

probably not an issue at present.