How to gracefully rename a package?
Moi! The new version of the OpenDX toolkit now provides sane libraries, so I wanted to restructure the packages a bit. In particular, there is a new package libdx4, so I wanted to rename what used to be dx-dev package as libdx4-dev. This turned out to be harder than I thought. The -dev package will usually be used for compiling local modules, so nothing within Debian depends on it. dx-dev's dependency on the main dx package is versioned with (= ${Source-Version}), so when trying to upgrade, apt wants to remove it without even considering to replace it with the new libdx4-dev (which conflicts, provides, and replaces dx-dev). So I created a dummy dx-dev package that simply depends on libdx4-dev. Works fine. But I also wanted to be nice to the user and automatically remove the dummy dx-dev once it's no longer needed. Therefore, libdx4-dev replaces anything in dx-dev, and dpkg removes the package. Works fine as well. Now the final problem is libdx4-dev and dx-dev are getting upgraded at the same time, and dpkg tries to setup dx-dev when it already has been removed: Preparing to replace dx-dev 1:4.2.0-8 (using dx-dev_4.3.0-1_all.deb) ... Unpacking replacement dx-dev ... Selecting previously deselected package libdx4-dev. Unpacking libdx4-dev (from libdx4-dev_4.3.0-1_i386.deb) ... Replacing files in old package dx-dev ... (Noting disappearance of dx-dev, which has been completely replaced.) dpkg: error processing dx-dev (--install): no package named `dx-dev' is installed, cannot configure Setting up libdx4-dev (4.3.0-1) ... Errors were encountered while processing: dx-dev The error can simply be ignored, but it's ugly, and I'd like to avoid it. So am I trying to do something stupid? Is there a better way to do it? Or should I simply go file a bug on dpkg? Any hints welcome, Daniel.
Re: How to gracefully rename a package?
Am 24.07.03 um 16:19:15 schrieb Daniel Kobras: [...] But I also wanted to be nice to the user and automatically remove the dummy dx-dev once it's no longer needed. Therefore, libdx4-dev replaces anything in dx-dev, and dpkg removes the package. [...] Cool strategy, but in general too complicated.[1] It happens from time to time that a rename has to take place. Perhaps the maintainer made a mistake in the past, perhaps upstream decided to change the name of the program (Phoenix - Firebird). Currently, you make a new package, with Replaces: and Conflicts: and stuff, but it will not be installed. So you make a transitional package with the description can be removed, but that's ugly. (All this is exactly what Daniel said already, just a little more general.) What I would like to see is some means to make this process easy. Such as the following algorithm: If package A disappears from the distribution, but there is a package B that replaces it, install that automatically.[2] I'm not sure whether this might have any unwanted side effects... Alternatively, there could be a new control field, say Supersedes:, which would result in the above behaviour. Of course, there'd have to be a change in policy... In any case, package frontends would have to implement it first, so it could be used only after the next release. Bye, Mike [1] The new package perhaps has a slightly different set of files. [2] Well, perhaps not in pure apt-get, but in dselect. -- |=| Michael Piefel |=| Humboldt-Universität zu Berlin |=| Tel. (+49 30) 2093 3831
Re: How to gracefully rename a package?
On Thu, Jul 24, 2003 at 04:37:55PM +0200, Michael Piefel wrote: Alternatively, there could be a new control field, say Supersedes:, which would result in the above behaviour. Of course, there'd have to be a change in policy... This has already been proposed as Previously: (#33344), and Successor-of: (#77325), but is probably nothing that dpkg itself can take care of (cf. #33344). Regards, Daniel.
Re: How to gracefully rename a package?
Am 24.07.03 um 16:51:11 schrieb Daniel Kobras: This has already been proposed as Previously: (#33344), and Successor-of: (#77325), but is probably nothing that dpkg itself can take care of (cf. #33344). Cool, so many names... I'm aware that it's not dpkg's responsibility. It's not necessary, dpkg is really low level. Things like this have to be implemented in frontends anyway. (Didn't I say that in my last mail?) And that's OK, people shouldn't use backends or be aware of the problems that they might be getting. Many people use apt-get as their frontend, although it's supposed to be a backend. I believe that's wrong. But anyway it could be integrated into apt-get as well, even if Jason disagrees. root (~) # apt-get install fileutils Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package fileutils root (~) # apt-get install coreutils Reading Package Lists... Done Building Dependency Tree... Done The following packages will be REMOVED: fileutils shellutils textutils 0 packages upgraded, 1 newly installed, 3 to remove and 0 not upgraded. Do you want to continue? [Y/n] Bye, Mike -- |=| Michael Piefel |=| Humboldt-Universität zu Berlin |=| Tel. (+49 30) 2093 3831