Joey Hess <[EMAIL PROTECTED]> writes: > Jérôme Marant wrote: >> I need to merge the wwsympa package into sympa. Both packages >> use debconf. >> I wonder how I should merge wwsympa debconf templates into sympa's. >> In sympa, debconf variables start with sympa/ and wwsympa ones >> start with wwsympa/ >> If I keep the same variable name, I feel like I'm going to have >> problem if the user decide to purge wwsympa, because of db_purge. >> So do I really have to care for the purge and to rename variables? > > Well, you basically have two options: > > 1. Don't change the name. Put identically named wsympa/* templates into > sympa and watch debconf do the right thing. (That is, when the new > sympa is installed, it will mark the templates as shared between the > two packages that contain them; then when wsympa is purged it will > remove it from the owners list of the questions but keep them around > since one other package still owns them. Reference counting.)
Smart ;-) I love this. You've made my day! >> A same kind of problem is likely to happen for the conffiles and other >> non-conffiles configuration files that I move from wwsympa to sympa >> and that are been removed in wwsympa postrm. > > I'm afraid you're on your own there; dpkg does not deal with shared > conffiles well when the older package is removed I think it removes the > conffile. I see no real solution to this. One disgusting way for non-conffiles would be to delete the removing part: if [ -e /var/lib/dpkg/info/wwsympa.postrm ]; then sed .... fi I think you won't like this, will you? ;-) -- Jérôme Marant http://marant.org