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

[PATCH/RFC] APT: do not error out for packages that disappear during installation



Hi again,

Here’s an approximation to the corresponding APT change.  Untested.
I hope it is clear enough to get the idea across.

Ciao,
Jonathan

=== modified file 'apt-pkg/deb/dpkgpm.cc'
--- apt-pkg/deb/dpkgpm.cc	2010-03-26 15:04:49 +0000
+++ apt-pkg/deb/dpkgpm.cc	2010-04-08 11:45:33 +0000
@@ -844,6 +844,8 @@
 	 break;
 	 
 	 case Item::Configure:
+	 Args[n++] = "--ignore-not-installed"
+	 Size += strlen(Args[n-1]);
 	 Args[n++] = "--configure";
 	 Size += strlen(Args[n-1]);
 	 break;

=== modified file 'debian/changelog'
--- debian/changelog	2010-03-26 15:04:49 +0000
+++ debian/changelog	2010-04-08 11:50:25 +0000
@@ -8,6 +8,14 @@
   * Add "manpages-pl (<< 20060617-3~)" to avoid file conflicts with
     that package that was providing some manpages for APT utilities.
 
+  [ Jonathan Nieder ]
+  * apt-pkg/deb/dpkgpm.cc:
+    - Use the new --ignore-not-installed option of dpkg to ensure
+      requests to configure a package that disappeared are tolerated.
+      This way, APT can upgrade and remove a package renamed using the
+      method described at http://wiki.debian.org/Renaming_a_Package
+      without errors.
+
   [ Julian Andres Klode ]
   * cmdline/apt-cache.cc:
     - Change behavior of showsrc to match the one of show (Closes: #512046).

=== modified file 'debian/control'
--- debian/control	2010-03-19 03:19:15 +0000
+++ debian/control	2010-04-08 11:51:59 +0000
@@ -11,7 +11,7 @@
 
 Package: apt
 Architecture: any
-Depends: ${shlibs:Depends}, debian-archive-keyring, ${misc:Depends}
+Depends: ${shlibs:Depends}, debian-archive-keyring, dpkg (>= 1.15.6.2), ${misc:Depends}
 Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7), manpages-pl (<< 20060617-3~)
 Provides: ${libapt-pkg:provides}
 Conflicts: python-apt (<< 0.7.93.2~)


Reply to: