Index: drush_make.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.drush.inc,v
retrieving revision 1.11.2.35
diff -u -F '^f' -u -F '^f' -r1.11.2.35 drush_make.drush.inc
Index: contrib/drush_make_d_o.convert.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/contrib/Attic/drush_make_d_o.convert.inc,v
retrieving revision 1.1.2.8
diff -u -F '^f' -u -F '^f' -r1.1.2.8 drush_make_d_o.convert.inc
--- contrib/drush_make_d_o.convert.inc	30 Nov 2009 00:49:32 -0000	1.1.2.8
+++ contrib/drush_make_d_o.convert.inc	1 Dec 2009 01:12:47 -0000
@@ -1,7 +1,38 @@
 <?php
 // $Id: drush_make_d_o.convert.inc,v 1.1.2.8 2009/11/30 00:49:32 dmitrig01 Exp $
 
-class DrushMakeDrupalorgConverter {
+class DrushMakeDrupalorgVersionChecker {
+  function latestVersion($project, $version) {
+    $project = array(
+      'name'           => $project,
+      'core'           => $this->core,
+      'version'        => $version,
+      'location'       => drush_get_option('drush-make-update-default-url'),
+    );
+    $project = drush_make_updatexml($project);
+
+    // Check for bad projects and branch releases.
+    // Because the version data we get back from the XML may not be the same
+    // data we passed, and because we can fail even if version data is
+    // returned, track both the success/failure of the request, and  the
+    // version data.
+    if (empty($project)) {
+      $final_version = $version;
+      $result = FALSE;
+    }
+    elseif (preg_match('/.*-dev$/', $project['version'])) {
+      $final_version = $project['version'];
+      $result = FALSE;
+    }
+    else {
+      $final_version = $project['version'];
+      $result = TRUE;
+    }
+    return array($result, $final_version);
+  }
+}
+
+class DrushMakeDrupalorgConverter extends DrushMakeDrupalorgVersionChecker {
   function __construct($from, $to = NULL) {
     $this->from = $from;
     $this->to = $to;
@@ -218,36 +249,66 @@
     return $output;
   }
 
-  function latestVersion($project, $version) {
-    $project = array(
-      'name'           => $project,
-      'core'           => $this->core,
-      'version'        => $version,
-      'location'       => drush_get_option('drush-make-update-default-url'),
-    );
-    $project = drush_make_updatexml($project);
+}
 
-    // Check for bad projects and branch releases.
-    // Because the version data we get back from the XML may not be the same
-    // data we passed, and because we can fail even if version data is
-    // returned, track both the success/failure of the request, and  the
-    // version data.
-    if (empty($project)) {
-      $final_version = $version;
-      $result = FALSE;
+class DrushMakeDrupalorgVerifier extends DrushMakeDrupalorgVersionChecker {
+  function __construct($makefile) {
+    $this->makefile = $makefile;
+  }
+
+  function run() {
+    if ($makefile = $this->read($this->makefile)) {
+      $this->verify($makefile);
     }
-    elseif (preg_match('/.*-dev$/', $project['version'])) {
-      $final_version = $project['version'];
-      $result = FALSE;
+  }
+
+  function read($makefile) {
+    if (!($makefile = drush_make_parse_info_file($makefile))) {
+      drush_make_error('FILE_ERROR', dt("Unable to parse file %file", array('%file' => $makefile)));
+      return FALSE;
     }
-    else {
-      $final_version = $project['version'];
-      $result = TRUE;
+    return $makefile;
+  }
+
+  function verify($makefile) {
+    // Run the regular validation first.  This performs basic syntax
+    // validation, and also pre-converts special syntax into a standard
+    // format. Since the info file validation doesn't return any data if
+    // validation fails, we have to bail here.
+    if (!($makefile = drush_make_validate_info_file($makefile))) {
+      return FALSE;
+    }
+
+    // Now run drupal.org specific validation on the file.
+    if (!($makefile = drush_make_d_o_validate_info_file($makefile))) {
+      return FALSE;
+    }
+
+    // Check for a stable release on the branch.
+    list($result, $final_version) = $this->latestVersion('drupal', $makefile['core_release']);
+    drush_log(dt("Verifying Drupal core version '%version'.", array('%version' => $final_version)), 'ok');
+    if (!$result) {
+      drush_make_error('BUILD_ERROR', dt("Drupal core does not have an official release for version '%version'.", array('%version' => $final_version)));
+      $errors = TRUE;
+    }
+  
+    if (isset($makefile['projects'])) {
+      foreach ($makefile['projects'] as $project => $project_data) {
+
+        // Use the update XML to verify this project actually has this 
+        // release.
+        drush_log(dt("Setting version for project '%project' to '%version'", array('%project' => $project, '%version' => $final_version)), 'ok');
+        list($result, $final_version) = $this->latestVersion($project, $project_data['version']);
+        if (!$result) {
+          drush_make_error('BUILD_ERROR', dt("Project '%project' does not have an official release for version '%version'.", array('%project' => $project, '%version' => $final_version)));
+          $errors = TRUE;
+        }
+      }
     }
-    return array($result, $final_version);
   }
 }
 
+
 /**
  * Custom logging function for conversions going to STDOUT.
  *
Index: contrib/drush_make_d_o.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/contrib/Attic/drush_make_d_o.drush.inc,v
retrieving revision 1.1.2.8
diff -u -F '^f' -u -F '^f' -r1.1.2.8 drush_make_d_o.drush.inc
--- contrib/drush_make_d_o.drush.inc	29 Nov 2009 21:12:00 -0000	1.1.2.8
+++ contrib/drush_make_d_o.drush.inc	1 Dec 2009 01:12:47 -0000
@@ -32,12 +32,26 @@ function drush_make_d_o_drush_command() 
     'description' => 'Convert the specified makefile to a drupal.org friendly format, and verify the converted file.',
     'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
   );
+  $items['verify makefile'] = array(
+    'description' => 'Verify the specified makefile is in a drupal.org-friendly format.',
+    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
+  );
 
   return $items;
 }
 
 
 /**
+ * Drush callback; verify a .make file is in a drupal.org friendly format.
+ */
+function drush_drush_make_d_o_verify_makefile($makefile) {
+  include_once 'drush_make_d_o.convert.inc';
+  $verifier = new DrushMakeDrupalorgVerifier($makefile);
+  $verifier->run();
+}
+
+
+/**
  * Drush callback; convert the makefile to a drupal.org friendly format.
  */
 function drush_drush_make_d_o_convert_makefile($from, $to = NULL) {
