=== modified file 'includes/session.inc'
--- includes/session.inc	2009-11-04 06:00:03 +0000
+++ includes/session.inc	2009-11-06 15:30:01 +0000
@@ -242,6 +242,11 @@ function drupal_session_commit() {
     return;
   }
 
+  // Expire the keep if possible.
+  if (isset($_SESSION['drupal_keep']) && ($_SESSION['drupal_keep'] > REQUEST_TIME)) {
+    unset($_SESSION['drupal_keep']);
+  }
+
   if (empty($user->uid) && empty($_SESSION)) {
     // There is no session data to store, destroy the session if it was
     // previously started.
@@ -271,6 +276,25 @@ function drupal_session_started($set = N
   return $session_started && session_id();
 }
 
+ /**
+ * Keep the current user's session open for a given length of time.
+ *
+ * @param $duration The length the session needs to remain open, in seconds.
+ */
+function drupal_session_keep($duration) {
+  $new_timestamp = REQUEST_TIME + $duration;
+  if (!isset($_SESSION['drupal_keep']) || ($new_timestamp > $_SESSION['drupal_keep'])) {
+    $_SESSION['drupal_keep'] = $new_timestamp;
+  }
+}
+
+/**
+ * Stop keeping the current user's session open.
+ */
+function drupal_session_keep_reset() {
+  unset($_SESSION['drupal_keep']);
+}
+
 /**
  * Called when an anonymous user becomes authenticated or vice-versa.
  *

=== modified file 'includes/update.inc'
--- includes/update.inc	2009-10-25 00:00:03 +0000
+++ includes/update.inc	2009-11-06 16:28:47 +0000
@@ -123,10 +123,6 @@ function update_fix_d7_requirements() {
     file_put_contents(conf_path() . '/settings.php', "\n" . '$databases = ' . var_export($databases, TRUE) . ';', FILE_APPEND);
   }
   if (drupal_get_installed_schema_version('system') < 7000 && !variable_get('update_d7_requirements', FALSE)) {
-    // Add the cache_path table.
-    $schema['cache_path'] = drupal_get_schema_unprocessed('system', 'cache');
-    $schema['cache_path']['description'] = 'Cache table used for path alias lookups.';
-
     // system_update_7042() renames columns, but these are needed to bootstrap.
     // Add empty columns for now.
     db_add_field('url_alias', 'source', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
@@ -196,6 +192,46 @@ function update_fix_d7_requirements() {
     );
     db_create_table('semaphore', $schema['semaphore']);
 
+    // Add registry tables since these are required during an update.
+    // @todo system_update_7006() becomes obsolete
+    $schema['registry'] = array(
+      'fields' => array(
+        'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'type'   => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
+        'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'module'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'weight'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      ),
+      'primary key' => array('name', 'type'),
+      'indexes' => array(
+        'hook' => array('type', 'weight', 'module'),
+      ),
+    );
+    $schema['registry_file'] = array(
+      'fields' => array(
+        'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
+        'filectime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'filemtime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      ),
+      'primary key' => array('filename'),
+    );
+    $schema['cache_registry'] = array(
+      'fields' => array(
+        'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
+        'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'headers'    => array('type' => 'text', 'not null' => FALSE),
+        'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
+      ),
+      'indexes' => array('expire' => array('expire')),
+      'primary key' => array('cid'),
+    );
+    db_create_table('cache_registry', $schema['cache_registry']);
+    db_create_table('registry', $schema['registry']);
+    db_create_table('registry_file', $schema['registry_file']);
+//    registry_rebuild();
+
     $schema['date_format_type'] = array(
       'description' => 'Stores configured date format types.',
       'fields' => array(

=== modified file 'update.php'
--- update.php	2009-11-04 06:00:03 +0000
+++ update.php	2009-11-06 15:28:34 +0000
@@ -396,6 +396,9 @@ else {
 if (isset($output) && $output) {
   // Explictly start a session so that the update.php token will be accepted.
   drupal_session_start();
+  // Force the session to stay open for 15 minutes.
+  drupal_session_keep(300);
+
   // We defer the display of messages until all updates are done.
   $progress_page = ($batch = batch_get()) && isset($batch['running']);
   print theme('update_page', array('content' => $output, 'show_messages' => !$progress_page));

