On Fri, Mar 10, 2006 at 02:33:35PM +0100, Christoph Haas wrote: > Evening... > > one thing I never really dealt with before are package splits. And since I > couldn't find any clear policy on how to define the dependencies properly > I'd like to get a second (and even third) opinion on this. > > 'cream' is a package with a lot of documentation. Until version 0.33 I had > all the files in a single package. Now in 0.34 I want to split off the > documentation so i have cream (main) and cream-doc (documentation). > > My debian/control file of the new 0.34 package now looks roughly like this: > > ----------------shnip-------------- > Source: cream > Section: editors > Priority: optional > Maintainer: Christoph Haas <[EMAIL PROTECTED]> > Build-Depends-Indep: debhelper (>= 4.0.0) > Standards-Version: 3.6.2 > > Package: cream > Architecture: all > Depends: gvim, ucf > Suggests: cream-doc > Description: ... > ... > > Package: cream-doc > Architecture: all > Conflicts: cream(<<0.34) > Replaces: cream(<<0.34) > Recommends: cream > Description: ... > ... > --------------shnup------------------ > > Without the Conflicts+Replaces in the cream-doc part users could install > the new cream-doc (0.34) package and get conflicts because the same > documentation-related files were formerly in the cream (0.33) package. > So I needed to make sure it gets removed before cream-doc (0.34) is > installed. > > Now when I install cream-doc (0.34) it looks like this: > > $> dpkg -i cream-doc_0.34-2_all.deb > Selecting previously deselected package cream-doc. > dpkg: considering removing cream in favour of cream-doc ... > dpkg: yes, will remove cream in favour of cream-doc. > (Reading database ... 173915 files and directories currently installed.) > Unpacking cream-doc (from cream-doc_0.34-2_all.deb) ... > Setting up cream-doc (0.34-2) ... > > Then the situation would look like this: > > ic cream 0.33.1-1 > ii cream-doc 0.34-2 > > The old cream package is still installed (shouldn't it be "rc"?). While > this is sane for APT it's a bit weird for the user because the > documentation now doesn't fit the main package any more. I would like to > install both new versions when either new package is installed. > > What would you propose to do to have a proper upgrade path here? Remove > 'cream' in the 'postinst' maintainer script of 'cream-doc' if a 'cream' > version of <<0.34 was installed? I don't want to make it even dirtier than > it's now. Certainly not :)
Besides, you can't run 2 dpkg processes at the same time (with the same $root). You probably want to make a new dummy package, one which I guess will have just copyright and changelog files, will be named "cream", and will have Depends: cream-doc, cream-program. This will cause existing cream installations to have the same things included in them, though by different packages. That 'cream' is installed (before the upgrade) will cause apt.. to want it to be installed after the upgrade, and to upgrade it to the latest version, also. Upgrading will pull in both of cream-program (rename to your liking) and cream-doc. You *could* also make cream-doc Depend: cream (${Source-Version}), but this really isn't necessary; apt an friends will upgrade both at the same time, unless the user specifically holds/upgrades exactly one package. BTW cream should have a description about being a "dummy package"; you should read: http://lists.debian.org/debian-devel/2005/10/msg01154.html Also, if cream had conffiles which changed across the upgrade, you would have to deal specially with them; "transferring ownership of conffiles", see my bugs #345112 and friends.. I'm interested if there are other ways of doing this, though. Actually, I wonder if this can be done purely with Conflicts+Replaces. In any case, you can and should always drop the upgrade foo after the next stable release. Justin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]