[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Split a package, rename an init file

In article <[🔎] 4829CC26.8080509@gmail.com> (gmane.linux.debian.devel.general) you wrote:
> I'd like to split a package foo into 2 new packages : foo and 
> foo-daemon. To do that I moved the daemon and the other obvious files 
> with dh_install -pfoo-dameon. I used dh_installinit to install the 
> init.d file to the foo-daemon package.

> Everything seems fine, but when I upgrade foo to the new foo+foo-daemon.

dpkg does not remove orphaned conffiles.

> I get 2 files in /etc/init.d/ :
> foo and foo-daemon.

> Here are my questions : what am I doing wrong ? How can I remove the 
> /etc/init.d/foo unnecessary file ?

If it is not *really* necessary do not move the conffile from one
package to another. If it must be, you'd need to do this in the

If old conffile was not modified by the local admin, remove it,
otherwise rename foo to foo-daemon before the package is unpacked. I
think there is some example code using dpkg-query in wiki.d.o.
cu andreas
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Reply to: