Index: release/package-release-nodes.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project/release/package-release-nodes.php,v retrieving revision 1.50 diff -u -r1.50 package-release-nodes.php --- release/package-release-nodes.php 18 Aug 2009 21:18:30 -0000 1.50 +++ release/package-release-nodes.php 23 Oct 2009 23:22:25 -0000 @@ -305,9 +305,9 @@ } } if (!empty($fails)) { - wd_msg('ERROR: Failed to re-generate release history XML files for !num project(s)', array('!num' => $fails)); + wd_msg('ERROR: Failed to re-generate release history XML files for !num project(s)', array('!num' => $fails)); } - wd_msg('Done re-generating release history XML files for !num project(s)', array('!num' => $i)); + wd_msg('Done re-generating release history XML files for !num project(s)', array('!num' => $i)); } } @@ -370,6 +370,12 @@ global $cvs, $tar, $gzip, $rm, $ln; global $license, $trans_install; + // If project_info module exists then load package.inc. + static $project_info; + if (!isset($project_info) && ($project_info = module_exists('project_info'))) { + module_load_include('package.inc', 'project_info'); + } + $rid = 2; // Files to ignore when checking timestamps: $exclude = array('.', '..', 'LICENSE.txt'); @@ -417,12 +423,17 @@ return false; } - // Fix any .info files + // Fix and process any .info files. foreach ($info_files as $file) { if (!fix_info_file_version($file, $uri, $version)) { wd_err("ERROR: Failed to update version in %file, aborting packaging", array('%file' => $file), $view_link); return false; } + + // Allow project_info to process the module .info file. + if ($project_info) { + project_info_package_info_process($nid, $file, $uri, $version); + } } // Link not copy, since we want to preserve the date... @@ -569,7 +580,7 @@ wd_err("ERROR: Unable to filter fuzzy strings and copying the translation files in %uri translation in version %version, not packaging", array('%uri' => $uri, '%version' => $version), $view_link); return FALSE; } - + // Add file to package. $to_tar .= ' '. $target; } Index: info/project_info.info =================================================================== RCS file: info/project_info.info diff -N info/project_info.info --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ info/project_info.info 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,6 @@ +; $Id$ +name = Project info +description = Provides information related to projects, such as dependencies. +package = Project +dependencies[] = project_release +core = 6.x Index: info/project_info.install =================================================================== RCS file: info/project_info.install diff -N info/project_info.install --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ info/project_info.install 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,54 @@ + 'The modules contained by a project release.', + 'fields' => array( + 'rid' => array( + 'description' => 'The {node}.nid of the project_release node.', + 'type' => 'int', + 'unsigned' => TRUE, + 'not null' => TRUE, + 'default' => 0, + ), + 'name' => array( + 'description' => 'Name of a module contained by the release.', + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + ), + ), + 'primary key' => array('rid', 'name'), + 'indexes' => array( + 'rid' => array('rid'), + ), + ); + + return $schema; +} + +/** + * Implementation of hook_install(). + */ +function project_info_install() { + drupal_install_schema('project_info'); +} + +/** + * Implementation of hook_uninstall(). + */ +function project_info_uninstall() { + drupal_uninstall_schema('project_info'); +} Index: info/project_info.package.inc =================================================================== RCS file: info/project_info.package.inc diff -N info/project_info.package.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ info/project_info.package.inc 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,23 @@ +