The Plone add-on cioppino.twothumbs got different profiles for backward compatibility. This profiles were created for Plone 4 and Plone 5. This different profiles are installed using zcml conditions:
'not-have plone-5',
'have plone-5'
Once Plone 6 is out (and for testing before) it is necessary to add a profile for Plone 6 or explicit point to the profile for Plone 5.
I tried to figure out, if that would be possible by adding a further condition for Plone 6 or by changing the zcml condition. If I do the first one either the Plone 6 profile entry will not be recognized or I get an error message of conflicting default profiles.
If I do the latter one and change the conditions to:
'not-have plone-4',
'have plone-4'
The profile for Plone 5 will not be used. The registration will not get any data. The registry.xml file from the Plone 5 profile will not be loaded/executed. There are no registry entries for this Plone add-on (once installed).
Addition: a github action test for a Plone add-on which uses the cioppino.twothumbs add-on fails because there could not found a default profile (of cioppino.twothumbs).
EDIT:
the nested configure block above isn't needed for Plone 4 since not-have plone-5 is true for Plone 6 also because every Plone version cumulates all lower feature versions too.
Currently every new Plone version cumulates all lower features too. Maybe your idea would fit more usecases but keep in mind that other packages rely on (not-)have plone-5 to be also true in Plone 6 ...
Is it possible to use 'the same approach within an add on ?
For example, my.addon has two profiles ( 'default' and 'another' ).
If the default profile is installed, you want 'viewletA' and 'MyVocabulary' to be 'a, b, c', but if 'another' profile is installed, you want 'ViewletB', and MyVocabulary to be 'some, thing, else'