On Thu, Apr 26, 2012 at 01:57:33PM -0400, Joey Hess wrote:
> While I'm leaning toward just putting the code in debhelper,
> I am worried about another issue in the patch. It makes
> update-catalog be called only on new install, not upgrade ([-z "$2"]).
> But then, if a catalog is added to an existing package,
> update-catalog will not be run. There is a new preinst that
> runs update-catalog on upgrade, but only during the transition
> to conffiles, so it does not close this hole.

Thanks for looking at it this close. This issue definitely needs to be
addressed.

It gets even worse. Consider the case where a maintainer removes a
catalog from an existing package and stops calling dh_installcatalogs.
Then the root catalog would contain a dangling reference and there
really is no way to fix this anymore, because our code is never invoked
again. This probably is precisely the reason for why we currently remove
and add the catalog. To fix this, we will have to keep removing the
package catalog from the root catalog in prerm, but remember that we did
it. In the postinst we will have to add it again, iff we removed it
before. The big question for me would be: How to transfer this state
from prerm to postinst?

Options would be:
1) Some state file in /etc. The apache2 upgrade to experimental takes
   this approach for instance. (Thanks to Arno Töll for pointing out.)
2) Some state file in /var/run. See sysv-rc for an example. A downside
   is that if our upgrade gets interrupted and the system is rebooted,
   our state file is gone.
3) Some state file in /var/lib. Seems ugly.
3) Abuse some debconf key for this.
4) Something else?

Any opinion on this?

Helmut



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to