Index: includes/install.core.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.core.inc,v
retrieving revision 1.3
diff -u -p -r1.3 install.core.inc
--- includes/install.core.inc	26 Feb 2010 18:31:29 -0000	1.3
+++ includes/install.core.inc	1 Mar 2010 03:07:57 -0000
@@ -741,9 +741,13 @@ function install_verify_requirements(&$i
 function install_system_module(&$install_state) {
   // Install system.module.
   drupal_install_system();
+
+  // Enable the user module so that sessions can be recorded during the
+  // upcoming bootstrap step.
+  module_enable(array('user'), FALSE);
+
   // Save the list of other modules to install for the upcoming tasks.
-  // variable_set() can be used now that system.module is installed and
-  // Drupal is bootstrapped.
+  // variable_set() can be used now that system.module is installed.
   $modules = $install_state['profile_info']['dependencies'];
 
   // The install profile is also a module, which needs to be installed
Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.128
diff -u -p -r1.128 install.inc
--- includes/install.inc	26 Feb 2010 18:31:29 -0000	1.128
+++ includes/install.inc	1 Mar 2010 03:07:57 -0000
@@ -589,8 +589,6 @@ function drupal_install_system() {
         'bootstrap' => 0,
       ))
     ->execute();
-  // Now that we've installed things properly, bootstrap the full Drupal environment
-  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
   system_rebuild_module_data();
 }
 
Index: includes/database/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/database.inc,v
retrieving revision 1.97
diff -u -p -r1.97 database.inc
--- includes/database/database.inc	15 Feb 2010 22:12:27 -0000	1.97
+++ includes/database/database.inc	1 Mar 2010 03:07:57 -0000
@@ -2402,9 +2402,7 @@ function db_next_id($existing_id = 0) {
  *   A Schema API table definition array.
  */
 function db_create_table($name, $table) {
-  if (!db_table_exists($name)) {
-    return Database::getConnection()->schema()->createTable($name, $table);
-  }
+  return Database::getConnection()->schema()->createTable($name, $table);
 }
 
 /**
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.44
diff -u -p -r1.44 node.install
--- modules/node/node.install	11 Feb 2010 17:44:47 -0000	1.44
+++ modules/node/node.install	1 Mar 2010 03:07:58 -0000
@@ -357,6 +357,23 @@ function node_schema() {
 }
 
 /**
+ * Implements hook_install().
+ */
+function node_install() {
+  // Populate the node access table.
+  db_insert('node_access')
+    ->fields(array(
+      'nid' => 0,
+      'gid' => 0,
+      'realm' => 'all',
+      'grant_view' => 1,
+      'grant_update' => 0,
+      'grant_delete' => 0,
+    ))
+    ->execute();
+}
+
+/**
  * Implements hook_update_dependencies().
  */
 function node_update_dependencies() {
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.450
diff -u -p -r1.450 system.install
--- modules/system/system.install	28 Feb 2010 20:10:34 -0000	1.450
+++ modules/system/system.install	1 Mar 2010 03:07:58 -0000
@@ -392,13 +392,11 @@ function system_requirements($phase) {
  */
 function system_install() {
   // Create tables.
-  $modules = array('system', 'filter', 'user', 'node');
-  foreach ($modules as $module) {
-    drupal_install_schema($module);
-    $versions = drupal_get_schema_versions($module);
-    $version = $versions ? max($versions) : SCHEMA_INSTALLED;
-    drupal_set_installed_schema_version($module, $version);
-  }
+  $module = 'system';
+  drupal_install_schema($module);
+  $versions = drupal_get_schema_versions($module);
+  $version = $versions ? max($versions) : SCHEMA_INSTALLED;
+  drupal_set_installed_schema_version($module, $version);
 
   // Clear out module list and hook implementation statics before calling
   // system_rebuild_theme_data().
@@ -408,73 +406,16 @@ function system_install() {
   // Load system theme data appropriately.
   system_rebuild_theme_data();
 
-  db_insert('users')
-    ->fields(array(
-      'uid' => 0,
-      'name' => '',
-      'mail' => '',
-    ))
-    ->execute();
-  // We need some placeholders here as name and mail are uniques and data is
-  // presumed to be a serialized array. This will be changed by the settings
-  // form.
-  db_insert('users')
-    ->fields(array(
-      'uid' => 1,
-      'name' => 'placeholder-for-uid-1',
-      'mail' => 'placeholder-for-uid-1',
-      'created' => REQUEST_TIME,
-      'status' => 1,
-      'data' => serialize(array()),
-    ))
-    ->execute();
-  // Built-in roles.
-  $rid_anonymous = db_insert('role')
-    ->fields(array('name' => 'anonymous user'))
-    ->execute();
-
-  $rid_authenticated = db_insert('role')
-    ->fields(array('name' => 'authenticated user'))
-    ->execute();
-
-  // Sanity check to ensure the anonymous and authenticated role IDs are the
-  // same as the drupal defined constants. In certain situations, this will
-  // not be true.
-  if ($rid_anonymous != DRUPAL_ANONYMOUS_RID) {
-    db_update('role')
-      ->fields(array('rid' => DRUPAL_ANONYMOUS_RID))
-      ->condition('rid', $rid_anonymous)
-      ->execute();
-  }
-
-  if ($rid_authenticated != DRUPAL_AUTHENTICATED_RID) {
-    db_update('role')
-      ->fields(array('rid' => DRUPAL_AUTHENTICATED_RID))
-      ->condition('rid', $rid_authenticated)
-      ->execute();
-  }
-
+  // Enable the default theme.
   variable_set('theme_default', 'garland');
-
   db_update('system')
     ->fields(array('status' => 1))
     ->condition('type', 'theme')
     ->condition('name', 'garland')
     ->execute();
 
-  db_insert('node_access')
-    ->fields(array(
-      'nid' => 0,
-      'gid' => 0,
-      'realm' => 'all',
-      'grant_view' => 1,
-      'grant_update' => 0,
-      'grant_delete' => 0,
-    ))
-    ->execute();
-
+  // Populate the cron key variable.
   $cron_key = md5(mt_rand());
-
   variable_set('cron_key', $cron_key);
 }
 
Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.39
diff -u -p -r1.39 user.install
--- modules/user/user.install	6 Feb 2010 14:55:34 -0000	1.39
+++ modules/user/user.install	1 Mar 2010 03:07:58 -0000
@@ -252,6 +252,58 @@ function user_schema() {
 }
 
 /**
+ * Implements hook_install().
+ */
+function user_install() {
+  // Insert a row for the anonymous user.
+  db_insert('users')
+    ->fields(array(
+      'uid' => 0,
+      'name' => '',
+      'mail' => '',
+    ))
+    ->execute();
+
+  // We need some placeholders here as name and mail are uniques and data is
+  // presumed to be a serialized array. This will be changed by the settings
+  // form in the installer.
+  db_insert('users')
+    ->fields(array(
+      'uid' => 1,
+      'name' => 'placeholder-for-uid-1',
+      'mail' => 'placeholder-for-uid-1',
+      'created' => REQUEST_TIME,
+      'status' => 1,
+      'data' => serialize(array()),
+    ))
+    ->execute();
+
+  // Built-in roles.
+  $rid_anonymous = db_insert('role')
+    ->fields(array('name' => 'anonymous user'))
+    ->execute();
+  $rid_authenticated = db_insert('role')
+    ->fields(array('name' => 'authenticated user'))
+    ->execute();
+
+  // Sanity check to ensure the anonymous and authenticated role IDs are the
+  // same as the drupal defined constants. In certain situations, this will
+  // not be true.
+  if ($rid_anonymous != DRUPAL_ANONYMOUS_RID) {
+    db_update('role')
+      ->fields(array('rid' => DRUPAL_ANONYMOUS_RID))
+      ->condition('rid', $rid_anonymous)
+      ->execute();
+  }
+  if ($rid_authenticated != DRUPAL_AUTHENTICATED_RID) {
+    db_update('role')
+      ->fields(array('rid' => DRUPAL_AUTHENTICATED_RID))
+      ->condition('rid', $rid_authenticated)
+      ->execute();
+  }
+}
+
+/**
  * @defgroup user-updates-6.x-to-7.x User updates from 6.x to 7.x
  * @{
  */
