Problem/Motivation
Drupal has a quirk where, when you use an install profile (and you almost always do), it gets "installed" as if it were a module, and becomes an installed extension, treated like a module. This is strange, because most of the time, install profiles have nothing to actually do with normal site operation. They just sit there for no reason.
The exception is traditional distributions, which may very well need the profile to stick around in order to lock down certain functionality or do updates. That fits the "this is a locked-in product" model of a traditional distribution. But most of the time, why keep the install profile?
Proposed resolution
Since Drupal 10.3, install profiles have been able to be uninstalled, no problem, like normal modules.
So I propose that, as part of finalizing the install process, the installer:
- Validate that the profile can be uninstalled.
- If it can be...then silently uninstall it.
This should NOT happen the profile has the distribution key in its info file. The assumption there is that it wants to do distribution-ey things, and therefore might need its install profile. Changing the scope and capabilities of the distribution element is a task for another time.
If the profile is not marked as a distribution, but also cannot be uninstalled due to validation errors, then just leave the profile installed, logging a warning (or maybe an error) with the reasons why the uninstall could not be done.
Remaining tasks
Get framework and release manager buy-in, then implement it with tests.
User interface changes
None.
API changes
Not really an API change, but it would change the default behavior of the installer.
Release notes snippet
TBD
Comments
Comment #3
phenaproximaDuplicate of #3605551: Allow install profiles to be automatically uninstalled.