[Piuparts-devel] Bug#677337: Bug#677337: piuparts: [install-upgrade-purge] should call apt-get purge, not apt-get remove and dpkg --purge

Luca Capello luca at pca.it
Thu Jun 14 13:01:35 UTC 2012


Hi Andreas!

On Wed, 13 Jun 2012 12:32:40 +0200, Andreas Beckmann wrote:
> On 2012-06-13 12:22, Luca Capello wrote:
>> The problem is that piuparts does an `apt-get remove` with all the
>> dependencies installed for bacula-director-sqlite3, thus dbconfig-common
>> gets removed *before* bacula-director-sqlite3 is purged.  I am not sure
>> how to solve this except with:
>
> Ignore this problem. I'm treating dbconfig-common as a fake-essential
> package to keep it available for the sid test whcih looks at leftover
> files, but this patch does not have release quality, yet.

Thank you for the quick reply.  However, I think that this is a problem
in apt-get/dpkg and not in piuparts.  Debian Policy 3.9.3.1 says:

  <http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails>

  § 6.8 Details of removal and/or configuration purging

  1.   <prerm> remove

       If prerm fails during replacement due to conflict

            <conflictor's-postinst> abort-remove \
              in-favour <package> <new-version>

       Or else we call:

            <postinst> abort-remove

       If this fails, the package is in a "Half-Configured" state, or
       else it remains "Installed".

  2.   The package's files are removed (except `conffile's).

Bingo!  After remove only `conffile's should be there, but wait,
dbconfig-common-generated file are not `conffile's in dpkg terms (they
are not listed in `dpkg-query -s $DEB`).  Thus, if I got it correctly,
this is similar to ucf-managed files, so should ucf be considered as a
fake-essential as well?

To summarize: I do not remember where in the Debian Policy there is
specified that a maintainer script should use binaries only from the
(Pre-)Depends: packages.  If we would enforce this rule, then piuparts
is not at fault.  But IMHO the problem is that there is no way to
specify a Post-Depends:, i.e. the fact that a dependency must be
available *after* removal (so for purging).

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/piuparts-devel/attachments/20120614/9a3077dc/attachment.pgp>


More information about the Piuparts-devel mailing list