diff -u b/core/includes/install.inc b/core/includes/install.inc --- b/core/includes/install.inc +++ b/core/includes/install.inc @@ -1063,9 +1063,6 @@ * Drupal's default installer theme. * - finish_url: A destination to visit after the installation of the * distribution is finished - * - base profile: The shortname of the base installation profile. Existence of - * this key denotes that the installation profile depends on a parent - * installation profile. * * 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 @@ -1079,6 +1076,9 @@ * Drupal's default installer theme. * - finish_url: A destination to visit after the installation of the * distribution is finished + * - base profile: The shortname of the base installation profile. Existence of + * this key denotes that the installation profile depends on a parent + * installation profile. * * 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 @@ -1105,8 +1105,8 @@ 'config_install_path' => NULL, ]; $profile_path = drupal_get_path('profile', $profile); - $info = \Drupal::service('extension.list.profile')->getExtensionInfo($profile); - $ancestors = \Drupal::service('extension.list.profile')->getAncestors($profile); + $info = \Drupal::service('info_parser')->parse("$profile_path/$profile.info.yml"); + $info += $defaults; $dependency_name_function = function ($dependency) { return Dependency::createFromString($dependency)->getName(); @@ -1118,8 +1118,8 @@ 'config_install_path' => NULL, ]; $profile_path = drupal_get_path('profile', $profile); - $info = \Drupal::service('info_parser')->parse("$profile_path/$profile.info.yml"); - $info += $defaults; + $info = \Drupal::service('extension.list.profile')->getExtensionInfo($profile); + $ancestors = \Drupal::service('extension.list.profile')->getAncestors($profile); $dependency_name_function = function ($dependency) { return Dependency::createFromString($dependency)->getName(); @@ -1127,9 +1127,6 @@ // remove any duplicates. $info['install'] = array_unique(array_merge($info['install'], $required, $info['dependencies'], $locale)); - // Remove the base profiles from the install list. - $info['install'] = array_diff($info['install'], array_keys($ancestors)); - // If the profile has a config/sync directory use that to install drupal. if (is_dir($profile_path . '/config/sync')) { $info['config_install_path'] = $profile_path . '/config/sync'; @@ -1143,6 +1140,9 @@ // remove any duplicates. $info['install'] = array_unique(array_merge($info['install'], $required, $info['dependencies'], $locale)); + // Remove the base profiles from the install list. + $info['install'] = array_diff($info['install'], array_keys($ancestors)); + // If the profile has a config/sync directory use that to install drupal. if (is_dir($profile_path . '/config/sync')) { $info['config_install_path'] = $profile_path . '/config/sync'; diff -u b/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php --- b/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -387,7 +387,7 @@ return FALSE; } - // Skip already uninstalled modules and dependencies of profiles. + // Skip already uninstalled modules. if (isset($installed_modules[$dependent]) && !isset($module_list[$dependent])) { $module_list[$dependent] = $dependent; } @@ -402,7 +402,7 @@ return FALSE; } - // Skip already uninstalled modules. + // Skip already uninstalled modules and dependencies of profiles. if (isset($installed_modules[$dependent]) && !isset($module_list[$dependent])) { $module_list[$dependent] = $dependent; } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -6,6 +6,7 @@ use Drupal\Core\Config\Entity\ConfigDependencyManager; use Drupal\Core\Installer\InstallerKernel; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; +use Drupal\Core\Extension\ProfileExtensionList; class ConfigInstaller implements ConfigInstallerInterface { @@ -51,6 +52,13 @@ class ConfigInstaller implements ConfigInstallerInterface { */ protected $sourceStorage; + /** + * The profile list. + * + * @var \Drupal\Core\Extension\ProfileExtensionList + */ + protected $profileList; + /** * Is configuration being created as part of a configuration sync. * @@ -80,14 +88,17 @@ class ConfigInstaller implements ConfigInstallerInterface { * The event dispatcher. * @param string $install_profile * The name of the currently active installation profile. + * @param \Drupal\Core\Extension\ProfileExtensionList|null $profile_list + * (optional) The profile list. */ - public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, ConfigManagerInterface $config_manager, EventDispatcherInterface $event_dispatcher, $install_profile) { + public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, ConfigManagerInterface $config_manager, EventDispatcherInterface $event_dispatcher, $install_profile, ProfileExtensionList $profile_list = NULL) { $this->configFactory = $config_factory; $this->activeStorages[$active_storage->getCollectionName()] = $active_storage; $this->typedConfig = $typed_config; $this->configManager = $config_manager; $this->eventDispatcher = $event_dispatcher; $this->installProfile = $install_profile; + $this->profileList = $profile_list ?: \Drupal::service('extension.list.profile'); } /** @@ -513,7 +524,8 @@ public function checkConfigurationToInstall($type, $name) { // Install profiles can not have config clashes. Configuration that // has the same name as a module's configuration will be used instead. - if ($name != $this->drupalGetProfile()) { + $profiles = $this->profileList->getAncestors($this->installProfile); + if (!isset($profiles[$name])) { // Throw an exception if the module being installed contains configuration // that already exists. Additionally, can not continue installing more // modules because those may depend on the current module being installed.