=== modified file 'includes/module.inc'
--- includes/module.inc	2009-07-28 19:06:15 +0000
+++ includes/module.inc	2009-07-31 00:50:52 +0000
@@ -103,6 +103,7 @@ function _module_build_dependencies($fil
   $p_major = '(?P<major>\d+)';
   // By setting the minor version to x, branches can be matched.
   $p_minor = '(?P<minor>\d+|x)';
+  $p_extra = '(?P<extra>-[A-Za-z]+\d+)?';
   foreach ($files as $filename => $file) {
     $graph[$file->name]['edges'] = array();
     if (isset($file->info['dependencies']) && is_array($file->info['dependencies'])) {
@@ -113,11 +114,13 @@ function _module_build_dependencies($fil
         if (isset($parts[1])) {
           $value['original_version'] = ' (' . $parts[1];
           foreach (explode(',', $parts[1]) as $version) {
-            if (preg_match("/^\s*$p_op\s*$p_core$p_major\.$p_minor/", $version, $matches)) {
+            if (preg_match("/^\s*$p_op\s*$p_core$p_major\.$p_minor$p_extra/", $version, $matches)) {
               $op = !empty($matches['operation']) ? $matches['operation'] : '=';
               if ($matches['minor'] == 'x') {
-                // If a module is newer than 2.x then it's at least 3.0. 
+                // If a module is newer than 2.x then it's at least 
+                // 3.0-unstable0.
                 $matches['minor'] = 0;
+                $matches['extra'] = 'unstable0';
                 if ($op == '>') {
                   $matches['major']++;
                   $op = '>=';
@@ -135,7 +138,7 @@ function _module_build_dependencies($fil
                 }
               }
               if ($op) {
-                $value['versions'][] = array('op' => $op, 'version' => $matches['major'] . '.' . $matches['minor']);
+                $value['versions'][] = array('op' => $op, 'version' => $matches['major'] . '.' . $matches['minor'] . $matches['extra']);
               }
             }
           }

