Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.67
diff -u -p -r1.67 install.inc
--- includes/install.inc	28 Aug 2008 08:40:33 -0000	1.67
+++ includes/install.inc	10 Sep 2008 07:29:55 -0000
@@ -502,6 +502,7 @@ function _drupal_install_module($module)
   if (drupal_get_installed_schema_version($module, TRUE) == SCHEMA_UNINSTALLED) {
     module_load_install($module);
     module_invoke($module, 'install');
+    module_invoke_all('module_install', $module);
     $versions = drupal_get_schema_versions($module);
     drupal_set_installed_schema_version($module, $versions ? max($versions) : SCHEMA_INSTALLED);
     return TRUE;
@@ -565,6 +566,7 @@ function drupal_uninstall_module($module
   // Uninstall the module(s).
   module_load_install($module);
   module_invoke($module, 'uninstall');
+  module_invoke_all('module_uninstall', $module);
 
   // Now remove the menu links for all paths declared by this module.
   if (!empty($paths)) {
Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.124
diff -u -p -r1.124 module.inc
--- includes/module.inc	21 Aug 2008 19:36:36 -0000	1.124
+++ includes/module.inc	10 Sep 2008 07:30:01 -0000
@@ -299,6 +299,10 @@ function module_enable($module_list) {
       node_access_needs_rebuild(TRUE);
     }
   }
+  
+  foreach ($invoke_modules as $module) {
+    module_invoke_all('module_enable', $module);
+  }
 }
 
 /**
@@ -318,6 +322,7 @@ function module_disable($module_list) {
 
       module_load_install($module);
       module_invoke($module, 'disable');
+      module_invoke_all('module_disable', $module);
       db_query("UPDATE {system} SET status = %d WHERE type = '%s' AND name = '%s'", 0, 'module', $module);
       $invoke_modules[] = $module;
     }
Index: modules/simpletest/tests/system_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/system_test.module,v
retrieving revision 1.2
diff -u -p -r1.2 system_test.module
--- modules/simpletest/tests/system_test.module	8 Sep 2008 20:49:47 -0000	1.2
+++ modules/simpletest/tests/system_test.module	10 Sep 2008 07:30:22 -0000
@@ -84,3 +84,27 @@ function system_test_redirect_invalid_sc
 function system_test_destination() {
   return 'The destination: ' . drupal_get_destination();
 }
+
+function system_test_module_install($module) {
+  if ($module == 'aggregator') {
+    drupal_set_message(t('hook_module_install fired for %module', array('%module' => $module)));
+  }
+}
+
+function system_test_module_enable($module) {
+  if ($module == 'aggregator') {
+    drupal_set_message(t('hook_module_enable fired for %module', array('%module' => $module)));
+  }
+}
+
+function system_test_module_disable($module) {
+  if ($module == 'aggregator') {
+    drupal_set_message(t('hook_module_disable fired for %module', array('%module' => $module)));
+  }
+}
+
+function system_test_module_uninstall($module) {
+  if ($module == 'aggregator') {
+    drupal_set_message(t('hook_module_uninstall fired for %module', array('%module' => $module)));
+  }
+}
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.11
diff -u -p -r1.11 system.test
--- modules/system/system.test	28 Aug 2008 08:37:46 -0000	1.11
+++ modules/system/system.test	10 Sep 2008 07:30:30 -0000
@@ -19,7 +19,7 @@ class EnableDisableCoreTestCase extends 
    * Implementation of setUp().
    */
   function setUp() {
-    parent::setUp();
+    parent::setUp('system_test');
 
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration'));
     $this->drupalLogin($this->admin_user);
@@ -39,6 +39,8 @@ class EnableDisableCoreTestCase extends 
     $this->drupalPost('admin/build/modules', $edit, t('Save configuration'));
     $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
 
+    $this->assertText(t('hook_module_install fired for aggregator'), t('Function hook_module_install("aggregator") called.'));
+    $this->assertText(t('hook_module_enable fired for aggregator'), t('Function hook_module_enable("aggregator") called.'));
     $this->assertModules(array('aggregator'), TRUE);
     $this->assertTableCount('aggregator', TRUE);
 
@@ -48,6 +50,7 @@ class EnableDisableCoreTestCase extends 
     $this->drupalPost('admin/build/modules', $edit, t('Save configuration'));
     $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
 
+    $this->assertText(t('hook_module_disable fired for aggregator'), t('Function hook_module_disable("aggregator") called.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', TRUE);
 
@@ -58,6 +61,7 @@ class EnableDisableCoreTestCase extends 
     $this->drupalPost(NULL, NULL, t('Uninstall'));
     $this->assertText(t('The selected modules have been uninstalled.'), t('Modules status has been updated.'));
 
+    $this->assertText(t('hook_module_uninstall fired for aggregator'), t('Function hook_module_uninstall("aggregator") called.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', FALSE);
   }
