Index: includes/update.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/update.inc,v
retrieving revision 1.46
diff -u -p -r1.46 update.inc
--- includes/update.inc	28 Apr 2010 20:25:20 -0000	1.46
+++ includes/update.inc	1 May 2010 05:12:42 -0000
@@ -707,6 +707,13 @@ function update_do_one($module, $number,
   }
 
   $ret = array();
+
+  if (!module_exists($module)){
+    $disabled_module[] = $module;
+    //Enable a module before trying to do an update on it.
+    module_enable($disabled_module, FALSE);
+  }
+
   if (function_exists($function)) {
     try {
       if ($context['log']) {
@@ -749,6 +756,11 @@ function update_do_one($module, $number,
     drupal_set_installed_schema_version($module, $number);
   }
 
+  //Disable the module we enabled for the update
+  if(!empty($disabled_module)){
+    module_disable($disabled_module);
+  }
+
   $context['message'] = 'Updating ' . check_plain($module) . ' module';
 }
 
