On Sat, Feb 09, 2002 at 06:27:06AM +0000, Pedro Gimeno wrote: > Package: dpkg > Version: 1.9.18 (testing) > > When upgrading dpkg from the stable (potato) version to the testing > (woody?) version, it complains about the script update-rc.d being > missing. This script, which was formerly in dpkg, has been moved to > sysvinit but dpkg does not require sysvinit.
Nothing should have to depend on an essential package (which sysvinit is), and nothing should have a versioned dep on an essential package (makes for bad dep loops). There's two solutions with this (which I had to similarly go through with libc6 and libdb.so.3 disappearing). 1) The new dpkg checks to see if it is upgrading from a version that contained update-rc.d. If it is, the preinst copies that script to update-rc.d.bak, and in postinst, copies it back. If sysvinit is then installed, it will overwrite dpkg's old (unmaintained in the dpkg database) version. This is what I do in libc6 for libdb.so.3. 2) This way was suggested to me for libc6, but I never got around to testing it. It works the same as above except that instead of copying, you use dpkg-divert to change where dpkg thinks the file is, in preinst. Do not use the rename feature of dpkg-divert. This way, when dpkg starts disappearing files that are no longer in the new package, it will try to unlink() update-rc.d.old, and leave the original update-rc.d. Number two is probably a safer bet since the script never disappears (while in #1 there's a small window where update-rc.d would be gone), but like I said, I haven't tested it. Ben -- .----------=======-=-======-=========-----------=====------------=-=-----. / Ben Collins -- Debian GNU/Linux -- WatchGuard.com \ ` [EMAIL PROTECTED] -- [EMAIL PROTECTED] ' `---=========------=======-------------=-=-----=-===-======-------=--=---'

