How to install and enable a default and admin theme in a Drupal 8 install profile with just YML (without using hook_install() or a .profile file)? I want to avoid using hook_install() so I can install from configuration.

I'd like my install profile to use seven for the admin theme, and my custom theme rutherford for the default/main frontend theme.

The annotated *.info.yml example on Drupal.org suggests that putting the following will install my themes:

# List any themes that should be installed as part of the profile installation.
# Note that this will not set any theme as the default theme.
themes:
  - rutherford
  - seven


My understanding of CMI is that I can then create a file called www/profiles/rocket/config/optional/system.theme.yml and put this in it to enable my themes:

admin: seven
default: rutherford


However none of this seems to work? My themes are found, but not installed or enabled:



Edit:

I've just noticed that the themes are set as default and admin, they're just not installed:
Ah ‍♂️. Trying to install my rutherford theme via the web UI gave a The rutherford theme was not found. error message, so it seemed the theme was at fault, not the profile.

I inspected my theme's info file and realised it had a dependency which was not being met. Commenting out the dependency got everything working again!

It's a shame that the php www/core/scripts/drupal quick-start rocket did not give me any errors about this unmet theme dependency, otherwise I would have saved about six hours of trying various different configuration approaches! Ah well, ce la Drupal!