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:39:57 -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,7 +423,7 @@ return false; } - // Fix any .info files + // Fix 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); @@ -425,6 +431,11 @@ } } + // Allow project_info to process the module .info file. + if ($project_info) { + project_info_package_info_process_all($nid, $info_files, $uri, $version); + } + // Link not copy, since we want to preserve the date... if (!drupal_exec("$ln -sf $license $uri/LICENSE.txt")) { return false; @@ -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,55 @@ += 6) { + // Clear previous records for the release. + project_info_package_list_clear($rid); + + // Store list of modules. + project_info_package_list_store($rid, $info_files); + } +} + +/** + * Clear the list of modules for a release. + * + * @param $rid + * The project release ID. + */ +function project_info_package_list_clear($rid) { + db_query('DELETE FROM {project_info_module} WHERE rid = %d', $rid); +} + +/** + * Store the list of modules for a release. + * + * @param $rid + * The project release ID. + * @param $info_files + * List of .info files to be processed. + */ +function project_info_package_list_store($rid, array $info_files) { + foreach ($info_files as $file) { + $module = basename($file, '.info'); + drupal_write_record('project_info_module', $rid, $module); + } +} Index: info/project_info.module =================================================================== RCS file: info/project_info.module diff -N info/project_info.module --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ info/project_info.module 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,7 @@ +