Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.70
diff -u -p -r1.70 update.module
--- modules/update/update.module	6 Oct 2010 13:36:30 -0000	1.70
+++ modules/update/update.module	22 Nov 2010 21:21:35 -0000
@@ -336,6 +336,35 @@ function update_form_system_modules_alte
 }
 
 /**
+ * Implements hook_verify_update_archive().
+ *
+ * @see drupal_system_listing()
+ * @see _system_rebuild_modules()
+ */
+function update_verify_update_archive($project, $archive_file, $directory) {
+  $files = file_scan_directory("$directory/$project", '/^' . DRUPAL_PHP_FUNCTION_PATTERN . '\.module$/', array('key' => 'name', 'min_depth' => 0));
+  $failures = array();
+  foreach ($files as $key => $file) {
+    // If it has no info file, throw an exception.
+    if (!file_exists($info_file = dirname($file->uri) . '/' . $file->name . '.info')) {
+      $failures[$file->name] = 'missing info file';
+      throw new Exception(t('One or more modules in the archive are missing an info file.'));
+    }
+
+    // Get the .info file for the module or theme this file belongs to.
+    $info = drupal_parse_info_file($info_file);
+
+    // If the module or theme is incompatible with Drupal core, throw an
+    // exception.
+    if (isset($info['core']) && $info['core'] != DRUPAL_CORE_COMPATIBILITY) {
+      $failures[$file->name] = 'incompatible';
+      throw new Exception(t('One or more modules in the archive is not compatible with Drupal 7.x.'));
+    }
+  }
+  return $failures;
+}
+
+/**
  * Helper function for use as a form submit callback.
  */
 function update_cache_clear_submit($form, &$form_state) {
? sites/clock7.local.dev
? sites/drupal7.local.dev
? sites/git-test.local.dev
? sites/git-test2.local.dev
? sites/git-test3.local.dev
? sites/git-test4.local.dev
? sites/install7.local.dev
? sites/libraries7.local.dev
? sites/views7.local.dev
