Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.152
diff -u -p -r1.152 install.inc
--- includes/install.inc	2 Jan 2011 17:23:20 -0000	1.152
+++ includes/install.inc	14 Feb 2011 02:49:20 -0000
@@ -199,7 +199,7 @@ function drupal_install_profile_distribu
   // At all other times, we load the profile via standard methods.
   else {
     $profile = drupal_get_profile();
-    $info = install_profile_info($profile);
+    $info = system_get_info('module', $profile);
     return $info['distribution_name'];
   }
 }
@@ -1199,6 +1199,10 @@ function drupal_check_module($module) {
  *   installed, to be shown throughout the installation process. Defaults to
  *   'Drupal'.
  *
+ * Note that this function does an expensive file system scan to get info file
+ * information for dependencies. If you only need information from the info
+ * file itself, use system_get_info().
+ *
  * Example of .info file:
  * @code
  *    name = Minimal
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.532
diff -u -p -r1.532 system.install
--- modules/system/system.install	2 Jan 2011 17:26:39 -0000	1.532
+++ modules/system/system.install	14 Feb 2011 02:49:20 -0000
@@ -33,7 +33,7 @@ function system_requirements($phase) {
     // is not running the default install profile.
     $profile = drupal_get_profile();
     if ($profile != 'standard') {
-      $info = install_profile_info($profile);
+      $info = system_get_info('module', $profile);
       $requirements['install_profile'] = array(
         'title' => $t('Install profile'),
         'value' => $t('%profile_name (%profile-%version)', array(
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.1003
diff -u -p -r1.1003 system.module
--- modules/system/system.module	4 Jan 2011 00:56:23 -0000	1.1003
+++ modules/system/system.module	14 Feb 2011 02:49:21 -0000
@@ -2387,9 +2387,14 @@ function _system_rebuild_module_data() {
     drupal_alter('system_info', $modules[$key]->info, $modules[$key], $type);
   }
 
-  // The install profile is required, if it's a valid module.
   if (isset($modules[$profile])) {
+    // The install profile is required, if it's a valid module.
     $modules[$profile]->info['required'] = TRUE;
+    // Add a default distribution name if the profile did not provide one. This
+    // matches the default value used in install_profile_info().
+    if (!isset($modules[$profile]->info['distribution_name'])) {
+      $modules[$profile]->info['distribution_name'] = 'Drupal';
+    }
   }
 
   return $modules;
