Open ida opened 6 years ago
Closing this because I don't have more time left to spend on this. Thanks anyways!
Made a sketch for failing when rising the instance, if a profile-name has no registration in a zcml-file: https://github.com/ida/Products.GenericSetup/commit/ca553414a9a9a6214c1328833ea70d6ea677b3d3
@tseaver As you are Zope-pioneer, I'd appreciate a lot your opinion, whether hooking into Products.GenericSetup.zcml.registerProfile
, is rather a bad idea, or could be a way to go.
@sunew pinging you in case you're still on debugging the related issue in the Plone-repo.
@ida thanks - I had to take look at some other issues, but will return to this one during the week.
Refs: #64, https://github.com/plone/Products.CMFPlone/issues/2228.
The multiple errors still occur, I think the culprit lies in
getProfileDependenciesChain
, because it is calling itself recursively: https://github.com/zopefoundation/Products.GenericSetup/blob/3ca5ee7b3947e02e2cad0c3eaad17d4913322dd7/Products/GenericSetup/tool.py#L1331And the try/except-block in
_runImportStepsFromContext
of where it's called initially, is masking this: https://github.com/zopefoundation/Products.GenericSetup/blob/3ca5ee7b3947e02e2cad0c3eaad17d4913322dd7/Products/GenericSetup/tool.py#L1386Probably because the first try succeeds and later an exception occurs from a recursive-call.
So, I tried raising an error explicitly in
getProfileDependenciesChain
, but that also doesn't stop the execution of further code.The only solution I came up with, is to return None in
getDependenciesForProfile
for symbolizing dependencies are broken, like it was sugested in #64: https://github.com/zopefoundation/Products.GenericSetup/pull/64/commits/dd1137493031167e296e95d4243c804fddb58724That will cause the interpreter to raise a "not-iterable"-error in
getProfileDependenciesChain
and fail hard, as wished.@tseaver, @icemac, @sunew, if you think this is feasible, I'd like to provide another PR.