? drush-1002658.patch
? drush-1003360.patch
? drush-1003480.patch
? drush-1004476.patch
? drush-571352.patch
? parche.txt
? includes/table.inc
Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.178
diff -u -r1.178 pm.drush.inc
--- commands/pm/pm.drush.inc	21 Dec 2010 18:35:28 -0000	1.178
+++ commands/pm/pm.drush.inc	22 Dec 2010 22:06:55 -0000
@@ -1438,23 +1438,10 @@
  * Command callback. Execute pm-update.
  */
 function drush_pm_update() {
-  // Signal that we will update drush core after the drush modules
-  // are updated, if an update to core is available.
-  drush_set_context('DRUSH_PM_UPDATE_ALL', TRUE);
-
   // Call pm-updatecode.  updatedb will be called in the post-update process.
   $args = _convert_csv_to_array(func_get_args());
   array_unshift($args, 'pm-updatecode');
   call_user_func_array('drush_invoke', $args);
-
-  // pm-updatecode will not do a core update of Drupal
-  // on the same invocation where non-core modules are
-  // updated.  If there is a core update available, then
-  // call pm-updatecode a second time to update core
-  // (but only if the first run finished successfully).
-  if (drush_get_context('DRUSH_PM_CORE_UPDATE_AVAILABLE', FALSE) && (drush_get_error() == DRUSH_SUCCESS)) {
-    call_user_func_array('drush_invoke', array('pm-updatecode', 'drupal'));
-  }
 }
 
 /**
Index: commands/pm/updatecode.pm.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/updatecode.pm.inc,v
retrieving revision 1.35
diff -u -r1.35 updatecode.pm.inc
--- commands/pm/updatecode.pm.inc	20 Dec 2010 21:50:22 -0000	1.35
+++ commands/pm/updatecode.pm.inc	22 Dec 2010 22:06:56 -0000
@@ -158,39 +158,28 @@
     return TRUE;
   }
 
+  $core_update_available = FALSE;
   if (isset($updateable['drupal'])) {
     $drupal_project = $updateable['drupal'];
     unset($update_info['drupal']);
     unset($updateable['drupal']);
-    $module_list = array_keys($update_info);
 
-    // We can only upgrade drupal core if there are no non-core
-    // modules enabled.  _pm_update_core will disable the
-    // modules passed in, and insure that they are enabled again
-    // when we're done.  However, each run of pm-updatecode will
-    // update -either- core, or the non-core modules; never both.
-    // This simplifies rollbacks.
+    // At present we need to update drupal core after non-core projects
+    // are updated.
     if (empty($updateable)) {
-      return _pm_update_core($drupal_project, $module_list, $tmpfile);
+      return _pm_update_core($drupal_project, $tmpfile);
     }
-    // If there are modules other than drupal core enabled, then go
-    // ahead and print instructions on how to upgrade core.  We will
-    // also continue, allowing the user to upgrade any upgradable
-    // modules if desired.
+    // If there are modules other than drupal core enabled, then update them
+    // first.
     else {
+      $core_update_available = TRUE;
       if ($drupal_project['status'] == UPDATE_NOT_SECURE) {
         drush_print(dt("NOTE: A security update for the Drupal core is available."));
       }
       else {
         drush_print(dt("NOTE: A code update for the Drupal core is available."));
       }
-      if (drush_get_context('DRUSH_PM_UPDATE_ALL', FALSE)) {
-        drush_print(dt("Drupal core will be updated after all of the non-core modules are updated.\n"));
-      }
-      else {
-        drush_print(dt("Drupal core cannot be updated at the same time that non-core modules are updated.  In order to update Drupal core with this tool, first allow the update of the modules listed above to complet, and then run pm-updatecode again.\n"));
-      }
-      drush_set_context('DRUSH_PM_CORE_UPDATE_AVAILABLE', TRUE);
+      drush_print(dt("Drupal core will be updated after all of the non-core modules are updated.\n"));
     }
   }
 
@@ -203,8 +192,16 @@
     }
   }
 
-  // Offer to update to the identified releases
-  return pm_update_packages($updateable, $tmpfile);
+  // Offer to update to the identified releases.
+  if (!pm_update_packages($updateable, $tmpfile)) {
+    return FALSE;
+  }
+
+  // After projects are updated we can update core.
+  if ($core_update_available) {
+    drush_print();
+    return _pm_update_core($drupal_project, $tmpfile);
+  }
 }
 
 /**
@@ -213,11 +210,8 @@
  * @param $project
  *   The drupal project information from the drupal.org update service,
  *   copied from $update_info['drupal'].  @see drush_pm_updatecode.
- * @param $module_list
- *   A list of the non-core modules that are enabled.  These must be disabled
- *   before core can be updated.
  */
-function _pm_update_core(&$project, $module_list = array(), $tmpfile) {
+function _pm_update_core(&$project, $tmpfile) {
   drush_include_engine('package_handler', drush_get_option('package-handler', 'wget'));
   $drupal_root = drush_get_context('DRUSH_DRUPAL_ROOT');
 
@@ -407,6 +401,8 @@
   }
   // Clear the cache, since some projects could have moved around.
   drush_drupal_cache_clear_all();
+
+  return TRUE;
 }
 
 /**
