Plone - ZCML condition for more than two profiles / more than two Plone main versions

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).

The plone-4 and plone-5 labels are a generic zcml feature. I suppose for/on Plone 6 a plone-6 label should be added so you can base conditions on it.

Probably not how it should be done, but you could probably make a workaround with something like

<include somefile condition="not-have plone-4'

and then in somefile.zcml

condition="not-have plone-5 

Then it should be Plone 6 ( or 3 :slight_smile: )

in Plone 6 there is <meta:provides feature="plone-60" /> see Products.CMFPlone/meta.zcml at master · plone/Products.CMFPlone · GitHub ... you could combine the conditions with nested <configure /> blocks:

<configure zcml:condition="not-have plone-60">
   <configure zcml:condition="not-have plone-5">
       <!-- something only for plone-4 -->
   </configure>
</configure>

would be nicer if zcml:condition could take more that one feature into account but it doesn't zope.configuration/xmlconfig.py at 4.0.3 · zopefoundation/zope.configuration · GitHub

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.

Could it be an idea to also have "plone-6" ?

If not, whatever add-on using this will have to make a new release when 6.1 arrives (?)

6.1 will have plone-60 and plone-61

Probably not important, but to me it feels more natural that 'every version of Plone 6' shoiuld be 'plone-6' and only 6.0 should be plone-60

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 ...

So a check for 'have plone-5' == True for Plone 6?

yes ... as defined in the meta.zcml file here Products.CMFPlone/meta.zcml at master · plone/Products.CMFPlone · GitHub