Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.44
diff -u -p -r1.44 taxonomy.install
--- modules/taxonomy/taxonomy.install	22 Aug 2010 13:55:53 -0000	1.44
+++ modules/taxonomy/taxonomy.install	27 Aug 2010 21:58:28 -0000
@@ -303,6 +303,14 @@ function taxonomy_update_7003() {
  * Move taxonomy vocabulary associations for nodes to fields and field instances.
  */
 function taxonomy_update_7004() {
+  // If taxonomy module is disabled, but there is taxonomy module data, 
+  // enable the module so that it can be updated.
+  $taxonomy_enabled = module_exists('taxonomy');
+  if (!$taxonomy_enabled && db_table_exists('taxonomy_term_data')) {
+    module_enable(array('taxonomy'));
+    drupal_load('module', 'taxonomy');
+  }
+
   $taxonomy_index = array(
     'description' => 'Maintains denormalized information about node/term relationships.',
     'fields' => array(
@@ -417,6 +425,13 @@ function taxonomy_update_7004() {
   foreach ($fields as $field) {
     db_drop_field('taxonomy_vocabulary', $field);
   }
+  // If the taxonomy module was disabled, re-disable it.
+  if (!$taxonomy_enabled) {
+    db_update('system')
+      ->fields(array('status' => 0))
+      ->condition('name', 'taxonomy')
+      ->execute();
+  }
 }
 
 /**
