Comment 21 for bug 516727

Revision history for this message
Steve Langasek (vorlon) wrote :

The code looks good to me overall (and consistent with how I thought this should've been done in the first place!).

Just a few comments:

- you guard the code with checks for 'configure' or 'upgrade'. First, 'upgrade' isn't a supported argument to postinst; second, shouldn't most of the other ways the maintainer scripts are invoked *also* trigger this? I.e., 'postinst abort-upgrade' should certainly restore the registry, and I think 'prerm remove' and 'prerm deconfigure' should as well. I think it's best to not be selective about the maintainer script arguments at all.
- you have code in place to make sure individual components don't register themselves while -core is in an unconfigured state; but there doesn't seem to be any code to ensure that, when -core is configured, it doesn't register *components* that are in an unconfigured state - doesn't this mean there's a window again where things are registered that shouldn't be?

(BTW, it's certainly too intrusive to make this change now for lucid, but this scenario would appear to *exactly* fit the triggers workflow...)