? 699858_modules_index.patch
? 706842-taxonomy-update-broken_0.patch
? 864464_old_d6_upgrade_boom_frown.patch
? 864464_old_d6_upgrade_boom_sad_panda.patch
? 864464_old_d6_upgrade_boom_sad_panda_0.patch
? 864464_old_d6_upgrade_please_commit_me_webchick_pleeeeeeeeease.patch
? 882814.patch
? 929208.patch
? head.tgz
? modules-index_2.patch
? temp.php
? sites/all/modules/user_warn
? sites/default/files
? sites/default/settings.php
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.323
diff -u -p -r1.323 update.php
--- update.php	18 May 2010 18:11:12 -0000	1.323
+++ update.php	3 Oct 2010 03:10:29 -0000
@@ -28,6 +28,16 @@ define('DRUPAL_ROOT', getcwd());
  */
 define('MAINTENANCE_MODE', 'update');
 
+/**
+ * Minimum schema version of Drupal 6 required for upgrade to Drupal 7.
+ *
+ * Upgrades from Drupal 6 to Drupal 7 require that Drupal 6 be running
+ * the most recent version, or the upgrade could fail. We can't easily
+ * check the Drupal 6 version once the update process has begun, so instead
+ * we check the schema version of system.module in the system table.
+ */
+define('REQUIRED_D6_SCHEMA_VERSION', '6055');
+
 function update_selection_page() {
   drupal_set_title('Drupal database update');
   $elements = drupal_get_form('update_script_selection_form');
Index: includes/update.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/update.inc,v
retrieving revision 1.70
diff -u -p -r1.70 update.inc
--- includes/update.inc	1 Oct 2010 18:37:22 -0000	1.70
+++ includes/update.inc	3 Oct 2010 03:10:29 -0000
@@ -120,6 +120,21 @@ function update_prepare_d7_bootstrap() {
   // created yet.
   drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
 
+  // Check to make sure that the user is running an up to date version of
+  // Drupal 6 before proceeding. Note this has to happen AFTER the database
+  // bootstraps because of drupal_get_installed_schema_version().
+  $system_schema = drupal_get_installed_schema_version('system');
+  $has_required_schema = $system_schema >= REQUIRED_D6_SCHEMA_VERSION;
+  $requirements = array(
+    'drupal 6 version' => array(
+      'title' => 'Drupal 6 version',
+      'value' => $has_required_schema ? 'You are running a current version of Drupal 6.' : 'You are not running a current version of Drupal 6',
+      'severity' => $has_required_schema ? REQUIREMENT_OK : REQUIREMENT_ERROR,
+      'description' => $has_required_schema ? '' : 'Please update your Drupal 6 installation to the most recent version before attempting to upgrade to Drupal 7',
+    ),
+  );
+  update_extra_requirements($requirements);
+
   // Create the registry tables.
   if (!db_table_exists('registry')) {
     $schema['registry'] = array(
@@ -148,6 +163,43 @@ function update_prepare_d7_bootstrap() {
     db_create_table('registry_file', $schema['registry_file']);
   }
 
+  // Older versions of Drupal 6 do not include the semaphore table, which is 
+  // required to bootstrap, so we add it now so that we can bootstrap and provide
+  // a reasonable error message.
+  if (!db_table_exists('semaphore')) {
+    $semaphore = array(
+      'description' => 'Table for holding semaphores, locks, flags, etc. that cannot be stored as Drupal variables since they must not be cached.',
+      'fields' => array(
+        'name' => array(
+          'description' => 'Primary Key: Unique name.',
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''
+        ),
+        'value' => array(
+          'description' => 'A value for the semaphore.',
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''
+        ),
+        'expire' => array(
+          'description' => 'A Unix timestamp with microseconds indicating when the semaphore should expire.',
+          'type' => 'float',
+          'size' => 'big',
+          'not null' => TRUE
+        ),
+      ),
+      'indexes' => array(
+        'value' => array('value'),
+        'expire' => array('expire'),
+      ),
+      'primary key' => array('name'),
+    );
+    db_create_table('semaphore', $semaphore);
+  }
+
   // The new cache_bootstrap bin is required to bootstrap to
   // DRUPAL_BOOTSTRAP_SESSION, so create it here rather than in
   // update_fix_d7_requirements().
@@ -436,7 +488,7 @@ function update_fix_d7_requirements() {
     db_create_table('role_permission', $schema['role_permission']);
 
     // Drops and recreates semaphore value index.
-    db_drop_index('semaphore', 'expire');
+    db_drop_index('semaphore', 'value');
     db_add_index('semaphore', 'value', array('value'));
 
     $schema['date_format_type'] = array(
Index: modules/path/path.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.api.php,v
retrieving revision 1.1
diff -u -p -r1.1 path.api.php
--- modules/path/path.api.php	17 Oct 2009 00:52:36 -0000	1.1
+++ modules/path/path.api.php	3 Oct 2010 03:10:29 -0000
@@ -13,28 +13,34 @@
 
 
 /**
- * The path has been inserted.
+ * Allow modules to respond to a path being inserted.
  *
  * @param $path
- *   The path array.
+ *   The path that has been inserted.
+ *
+ * @see path_save()
  */
 function hook_path_insert($path) {
 }
 
 /**
- * The path has been updated.
+* Allow modules to respond to a path being updated.
  *
  * @param $path
- *   The path array.
+ *   The path thaat has been updated.
+ *
+ * @see path_save()
  */
 function hook_path_update($path) {
 }
 
 /**
- * The path has been deleted.
+* Allow modules to respond to a path being deleted.
  *
  * @param $path
- *   The path array.
+ *   The path that has been deleted.
+ *
+ * @see path_delete()
  */
 function hook_path_delete($path) {
 }
