Add-on uninstall profiles and dependent profiles: reinstallation failure

Folks, I have an add-on I am working on in the fashion of example.p4p5, and I run into issues when uninstalling... AFAICT, I have no way of marking a dependent (base) profile as removed (without programmatic intervention, I suppose):

Suppose a profile called "default" depends on a profile called "base", and an "uninstall" profile depends on and runs "uninstall-base" as part of its work. All seems fine, until you try to re-install default, and portal_setup thinks that "base" is still installed for that add-on. Am I missing some way to associate the uninstall-base profile with the "base" profile that needs to be marked as removed? Otherwise, this seems like a bug affecting re-install of any add-on using this scheme.


IMO, the pattern proposed in that package is overcomplicated (it deals with 6 profiles instead of 2) and must not be considered as a good practice.

I'm stock on the legacy bundle until the PLIPs on resource registry simplification are finished.

I was able to solve this in my add-on with an programmatic import step removing a key/value pair from portal_setup._profile_upgrade_versions for the base profile.


Also ref:

FYI: @ebrehault @hvelarde

1 Like