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

[PATCH dpkg 0/3] supporting seemless package renames (dpkg --configure --ignore-not-installed)



I was reading some old material about trouble handling renaming binary
packages in a seemless manner [1] [2].  My main thought: this
shouldn’t be hard to fix.

Indeed, I don’t think it is.  There are two steps:

First, dpkg learns a --ignore-not-installed option so that

    dpkg --ignore-not-installed --configure disappeared-package new-version

is treated the same as

    dpkg --configure new-version

if disappeared-package is not installed.

Next, apt learns to always use this option when calling
dpkg --configure.

This series takes care of the first step.  It is the logical
continuation of a fix from version 1.10.22, when dpkg learned to
ignore not-installed packages during the configuration pass of a
--install run.

Patches 1 and 2 of this series have nothing to do with that topic.
You can easily omit them.  They just make src/packages.c a little
easier to read; I wrote them while reading through that code.

Patch 3 is the important part: it adds the new option and a
test to demonstrate the problem it fixes.

Thoughts?

Jonathan Nieder (3):
  dpkg: Describe the purpose of packages()
  dpkg: factor out package-listing functions from packages()
  dpkg --configure: optionally tolerate not-installed packages in argv

 configure.ac                      |    1 +
 debian/changelog                  |    7 ++
 man/dpkg.1                        |    7 ++
 src/Makefile.am                   |    2 +
 src/main.c                        |    4 +-
 src/main.h                        |    2 +-
 src/packages.c                    |  127 +++++++++++++---------
 src/test/Makefile.am              |    5 +
 src/test/t-disappear-configure.sh |  208 +++++++++++++++++++++++++++++++++++++
 9 files changed, 309 insertions(+), 54 deletions(-)
 create mode 100644 src/test/Makefile.am
 create mode 100755 src/test/t-disappear-configure.sh

[1] http://wiki.debian.org/Renaming_a_Package
[2] http://lists.debian.org/deity/2006/06/msg00059.html


Reply to: