Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.86
diff -u -F^f -r1.86 module.inc
--- includes/module.inc	2 Oct 2006 16:49:08 -0000	1.86
+++ includes/module.inc	4 Oct 2006 12:05:23 -0000
@@ -175,11 +175,13 @@ function _module_build_dependents($files
  * name - The real name of the module for display purposes.
  * description - A brief description of the module.
  * dependencies - A space delimited list of the short names (shortname) of other modules this module depends on.
+ * package - The name of the package of modules this module belongs to.
  *
  * Example of .info file:
  *   name = Forum
  *   description = Enables threaded discussions about general topics.
  *   dependencies = taxonomy comment
+ *   package = Core - optional 
  *
  * @param $filename
  *   The file we are parsing. Accepts file with relative or absolute path.
Index: modules/aggregator/aggregator.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 aggregator.info
--- modules/aggregator/aggregator.info	31 Aug 2006 20:22:34 -0000	1.1
+++ modules/aggregator/aggregator.info	4 Oct 2006 12:05:29 -0000
@@ -1,3 +1,4 @@
 ; $Id: aggregator.info,v 1.1 2006/08/31 20:22:34 dries Exp $
 name = Aggregator
 description = "Aggregates syndicated content (RSS, RDF, and Atom feeds)."
+package = Core - optional
Index: modules/block/block.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 block.info
--- modules/block/block.info	31 Aug 2006 20:22:34 -0000	1.1
+++ modules/block/block.info	4 Oct 2006 12:05:29 -0000
@@ -1,4 +1,4 @@
 ; $Id: block.info,v 1.1 2006/08/31 20:22:34 dries Exp $
 name = Block
 description = Controls the boxes that are displayed around the main content.
-
+package = Core - required
Index: modules/blog/blog.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 blog.info
--- modules/blog/blog.info	31 Aug 2006 20:22:34 -0000	1.1
+++ modules/blog/blog.info	4 Oct 2006 12:05:29 -0000
@@ -1,4 +1,4 @@
 ; $Id: blog.info,v 1.1 2006/08/31 20:22:34 dries Exp $
 name = Blog
 description = Enables keeping an easily and regularly updated web page or a blog.
-
+package = Core - optional
Index: modules/blogapi/blogapi.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 blogapi.info
--- modules/blogapi/blogapi.info	31 Aug 2006 20:22:34 -0000	1.1
+++ modules/blogapi/blogapi.info	4 Oct 2006 12:05:29 -0000
@@ -1,4 +1,4 @@
 ; $Id: blogapi.info,v 1.1 2006/08/31 20:22:34 dries Exp $
 name = Blog API
 description = Allows users to post content using applications that support XML-RPC blog APIs.
-
+package = Core - optional
Index: modules/book/book.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 book.info
--- modules/book/book.info	31 Aug 2006 20:22:34 -0000	1.1
+++ modules/book/book.info	4 Oct 2006 12:05:29 -0000
@@ -1,4 +1,4 @@
 ; $Id: book.info,v 1.1 2006/08/31 20:22:34 dries Exp $
 name = Book
 description = Allows users to collaboratively author a book.
-
+package = Core - optional
Index: modules/comment/comment.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 comment.info
--- modules/comment/comment.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/comment/comment.info	4 Oct 2006 12:05:31 -0000
@@ -1,4 +1,4 @@
 ; $Id: comment.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Comment
 description = Allows users to comment on and discuss published content.
-
+package = Core - optional
Index: modules/contact/contact.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 contact.info
--- modules/contact/contact.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/contact/contact.info	4 Oct 2006 12:05:32 -0000
@@ -1,4 +1,4 @@
 ; $Id: contact.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Contact
 description = Enables the use of both personal and site-wide contact forms.
-
+package = Core - optional
Index: modules/drupal/drupal.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/drupal/drupal.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 drupal.info
--- modules/drupal/drupal.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/drupal/drupal.info	4 Oct 2006 12:05:32 -0000
@@ -1,4 +1,4 @@
 ; $Id: drupal.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Drupal
 description = Lets you register your site with a central server and improve ranking of Drupal projects by posting information on your installed modules and themes; also enables users to log in using a Drupal ID.
-
+package = Core - optional
Index: modules/filter/filter.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 filter.info
--- modules/filter/filter.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/filter/filter.info	4 Oct 2006 12:05:33 -0000
@@ -1,4 +1,4 @@
 ; $Id: filter.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Filter
 description = Handles the filtering of content in preparation for display.
-
+package = Core - required
Index: modules/forum/forum.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.info,v
retrieving revision 1.2
diff -u -F^f -r1.2 forum.info
--- modules/forum/forum.info	2 Oct 2006 16:49:08 -0000	1.2
+++ modules/forum/forum.info	4 Oct 2006 12:05:34 -0000
@@ -2,3 +2,4 @@
 name = Forum
 description = Enables threaded discussions about general topics.
 dependencies = taxonomy comment
+package = Core - optional
Index: modules/help/help.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 help.info
--- modules/help/help.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/help/help.info	4 Oct 2006 12:05:34 -0000
@@ -1,3 +1,4 @@
 ; $Id: help.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Help
 description = Manages the display of online help.
+package = Core - optional
Index: modules/legacy/legacy.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/legacy/legacy.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 legacy.info
--- modules/legacy/legacy.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/legacy/legacy.info	4 Oct 2006 12:05:34 -0000
@@ -1,4 +1,4 @@
 ; $Id: legacy.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Legacy
 description = Provides legacy handlers for upgrades from older Drupal installations.
-
+package = Core - optional
Index: modules/locale/locale.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 locale.info
--- modules/locale/locale.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/locale/locale.info	4 Oct 2006 12:05:34 -0000
@@ -1,4 +1,4 @@
 ; $Id: locale.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Locale
 description = Enables the translation of the user interface to languages other than English.
-
+package = Core - optional
Index: modules/menu/menu.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 menu.info
--- modules/menu/menu.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/menu/menu.info	4 Oct 2006 12:05:35 -0000
@@ -1,4 +1,4 @@
 ; $Id: menu.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Menu
 description = Allows administrators to customize the site navigation menu.
-
+package = Core - optional
Index: modules/node/node.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 node.info
--- modules/node/node.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/node/node.info	4 Oct 2006 12:05:35 -0000
@@ -1,4 +1,5 @@
 ; $Id: node.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Node
 description = Allows content to be submitted to the site and displayed on pages.
+package = Core - required
 
Index: modules/path/path.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 path.info
--- modules/path/path.info	31 Aug 2006 20:22:35 -0000	1.1
+++ modules/path/path.info	4 Oct 2006 12:05:38 -0000
@@ -1,4 +1,4 @@
 ; $Id: path.info,v 1.1 2006/08/31 20:22:35 dries Exp $
 name = Path
 description = Allows users to rename URLs.
-
+package = Core - optional
Index: modules/ping/ping.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/ping/ping.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 ping.info
--- modules/ping/ping.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/ping/ping.info	4 Oct 2006 12:05:39 -0000
@@ -1,4 +1,4 @@
 ; $Id: ping.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Ping
 description = Alerts other sites when your site has been updated.
-
+package = Core - optional
Index: modules/poll/poll.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 poll.info
--- modules/poll/poll.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/poll/poll.info	4 Oct 2006 12:05:39 -0000
@@ -1,4 +1,4 @@
 ; $Id: poll.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Poll
 description = Allows your site to capture votes on different topics in the form of multiple choice questions.
-
+package = Core - optional
Index: modules/profile/profile.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 profile.info
--- modules/profile/profile.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/profile/profile.info	4 Oct 2006 12:05:39 -0000
@@ -1,4 +1,4 @@
 ; $Id: profile.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Profile
 description = Supports configurable user profiles.
-
+package = Core - optional
Index: modules/search/search.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 search.info
--- modules/search/search.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/search/search.info	4 Oct 2006 12:05:39 -0000
@@ -1,4 +1,4 @@
 ; $Id: search.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Search
 description = Enables site-wide keyword searching.
-
+package = Core - optional
Index: modules/statistics/statistics.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 statistics.info
--- modules/statistics/statistics.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/statistics/statistics.info	4 Oct 2006 12:05:40 -0000
@@ -1,4 +1,4 @@
 ; $Id: statistics.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Statistics
 description = Logs access statistics for your site.
-
+package = Core - optional
Index: modules/system/system.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 system.info
--- modules/system/system.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/system/system.info	4 Oct 2006 12:05:41 -0000
@@ -1,4 +1,4 @@
 ; $Id: system.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = System
 description = Handles general site configuration for administrators.
-
+package = Core - required
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.374
diff -u -F^f -r1.374 system.module
--- modules/system/system.module	3 Oct 2006 23:18:18 -0000	1.374
+++ modules/system/system.module	4 Oct 2006 12:05:44 -0000
@@ -1525,19 +1525,8 @@ function theme_system_modules($form) {
   if (isset($form['confirm'])) {
     return drupal_render($form);
   }
-
-  foreach (element_children($form['name']) as $key) {
-    $row = array();
-    $row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
-
-    if (module_exists('throttle')) {
-      $row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
-    }
-    $row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
-    $row[] = drupal_render($form['description'][$key]);
-    $rows[] = $row;
-  }
-
+  
+  // Individual table headers.
   $header = array(t('Enabled'));
   if (module_exists('throttle')) {
     $header[] = t('Throttle');
@@ -1545,7 +1534,46 @@ function theme_system_modules($form) {
   $header[] = t('Name');
   $header[] = t('Description');
 
-  $output = theme('table', $header, $rows);
+  // Pull package information from module list and start grouping modules.
+  $modules = $form['validation_modules']['#value'];
+  foreach ($modules as $module) {
+    if (!isset($module->info['package'])) {
+      $module->info['package'] = 'Uncategorized';
+    }
+    $packages[$module->info['package']][$module->name] = $module->info;
+  }
+
+  // Reorder packages.
+  $core_packages = array();
+  // Re-order packages to force core modules to the top.
+  foreach (array('Core - required', 'Core - optional') as $key) {
+    $core_packages[$key] = $packages[$key];
+    unset($packages[$key]);
+  }
+  ksort($packages);
+  $packages['Core - required'] = $core_packages['Core - required'];
+  unset($core_packages['Core - required']);
+  $packages = array_merge($core_packages, $packages);
+
+  // Display packages.
+  $output = '';
+  foreach ($packages as $package => $modules) {
+    $rows = array();
+    foreach ($modules as $key => $module) {
+      $row = array();
+      $row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
+  
+      if (module_exists('throttle')) {
+        $row[] = array('data' => drupal_render($form['throttle'][$key]), 'align' => 'center');
+      }
+      $row[] = '<strong>'. drupal_render($form['name'][$key]) .'</strong>';
+      $row[] = drupal_render($form['description'][$key]);
+      $rows[] = $row;
+    }
+    $output .= '<h2>'. t($package) .'</h2>';
+    $output .= theme('table', $header, $rows);
+  }
+
   $output .= drupal_render($form);
   return $output;
 }
Index: modules/taxonomy/taxonomy.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 taxonomy.info
--- modules/taxonomy/taxonomy.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/taxonomy/taxonomy.info	4 Oct 2006 12:05:44 -0000
@@ -1,4 +1,4 @@
 ; $Id: taxonomy.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Taxonomy
 description = Enables the categorization of content.
-
+package = Core - optional
Index: modules/throttle/throttle.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/throttle/throttle.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 throttle.info
--- modules/throttle/throttle.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/throttle/throttle.info	4 Oct 2006 12:05:44 -0000
@@ -1,4 +1,4 @@
 ; $Id: throttle.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Throttle
 description = Handles the auto-throttling mechanism, to control site congestion.
-
+package = Core - optional
Index: modules/tracker/tracker.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 tracker.info
--- modules/tracker/tracker.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/tracker/tracker.info	4 Oct 2006 12:05:45 -0000
@@ -1,4 +1,4 @@
 ; $Id: tracker.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Tracker
 description = Enables tracking of recent posts for users.
-
+package = Core - optional
Index: modules/upload/upload.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 upload.info
--- modules/upload/upload.info	31 Aug 2006 20:22:36 -0000	1.1
+++ modules/upload/upload.info	4 Oct 2006 12:05:45 -0000
@@ -1,4 +1,4 @@
 ; $Id: upload.info,v 1.1 2006/08/31 20:22:36 dries Exp $
 name = Upload
 description = Allows users to upload and attach files to content.
-
+package = Core - optional
Index: modules/user/user.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 user.info
--- modules/user/user.info	31 Aug 2006 20:22:37 -0000	1.1
+++ modules/user/user.info	4 Oct 2006 12:05:45 -0000
@@ -1,4 +1,4 @@
 ; $Id: user.info,v 1.1 2006/08/31 20:22:37 dries Exp $
 name = User
 description = Manages the user registration and login system.
-
+package = Core - required
Index: modules/watchdog/watchdog.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/watchdog/watchdog.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 watchdog.info
--- modules/watchdog/watchdog.info	31 Aug 2006 20:22:37 -0000	1.1
+++ modules/watchdog/watchdog.info	4 Oct 2006 12:05:51 -0000
@@ -1,4 +1,4 @@
 ; $Id: watchdog.info,v 1.1 2006/08/31 20:22:37 dries Exp $
 name = Watchdog
 description = Logs and records system events.
-
+package = Core - required
