Bug#202997: dpkg: Installing and disappearing a package in one go.
Package: dpkg
Version: 1.10.10
Severity: normal
Tags: patch
Hi!
To rename a package with minimum impact on the user, I've created a
dummy package with the old name that pulls in the new package. The new
package replaces all files of the dummy package, which is then
disappeared. This doesn't work currently when both packages are updated
in one go because dpkg tries to configure the dummy package even though
it has already disappeared, eg.
% dpkg -i dx-dev_4.3.0-1_i386.deb libdx4-dev_4.3.0-1_i386.deb
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 following patch (against dpkg 1.10.10) should fix this.
Regards,
Daniel.
---[snip]---
--- main/packages.c.orig 2003-07-25 12:10:33.000000000 +0200
+++ main/packages.c 2003-07-25 12:12:52.000000000 +0200
@@ -193,7 +193,9 @@
switch (cipaction->arg) {
case act_configure:
case act_install:
- deferred_configure(pkg);
+ /* Don't try to configure pkgs that we've just disappeared. */
+ if (pkg->status != stat_notinstalled)
+ deferred_configure(pkg);
break;
case act_remove: case act_purge:
deferred_remove(pkg);
---[snap]---
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux antares 2.4.21 #3 SMP Fri Jul 18 13:20:50 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=de_DE
Versions of packages dpkg depends on:
ii dselect 1.10.10 a user tool to manage Debian packa
ii libc6 2.3.1-17 GNU C Library: Shared libraries an
-- no debconf information
Reply to: