[Zope-CMF] GenericSetup: Apply profile dependencies only once

Maurits van Rees m.van.rees at zestsoftware.nl
Fri Sep 25 02:17:38 CEST 2015


Op 24-09-15 om 13:54 schreef yuppie:
> Hi Maurits,
>
> Maurits van Rees wrote:
>> Op 23-09-15 om 16:53 schreef yuppie:
>>> if you run a base profile in purge mode, shouldn't that purge profile
>>> versions automatically?
>>
>> GenericSetup itself is not doing this currently.
>> It might be good to do that, but I guess it is not always needed.
>> Then again, I have never written a base profile myself, only extension
>> profiles, so I'm not sure what creators of base profiles expect here.
>
> if you run a base profile in purge mode, you usually want to undo all
> previous configuration and start from scratch. In theory you could do
> that just with some setup handlers and keep the rest of the
> configuration. But I doubt someone uses it that way.
>
> If you start from scratch, old profile versions data becomes incorrect.
> So I think GenericSetup should delete that data automatically.

I have updated my pull request to add that purgeProfileVersions method 
and to run this before running the import steps of a base profile.

See https://github.com/zopefoundation/Products.GenericSetup/pull/18

>> Anyway, let's not lose too much sleep arguing over this.
>> I have created a new pull request, superseding the other pep8 one.
>> https://github.com/zopefoundation/Products.GenericSetup/pull/21
>>
>> This cleans up pep8 in the tests. The first commit is only white space.
>> The second commit is more aggressive, but far, far smaller.
>>
>> Plus in the rest of the code this fixes only pep8 issues in comments or
>> in empty lines: removing or adding a line or removing white space on an
>> otherwise blank line.
>
> This would be a compromise I can live with. But I was not the only one
> who voted against your first PR.

Thanks.

Tres, how about you?


-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl



More information about the Zope-CMF mailing list