Hi Michael!

On Fri, 2009-07-17 at 11:35:39 +0200, Michael Vogt wrote:
> Package: dpkg
> Version: 1.15.3.1

> I debugged a failure in ubuntu today where the package "update-motd"
> was updated to a new version that contained no files (that was
> intentional, the package was supposed to go away) [1].

> [1] https://bugs.launchpad.net/ubuntu/+source/update-motd/+bug/400462

> Dpkg noticed that the package was empty and purged it during (after?)
> apt ran it with --unpack. Later apt tried to configure the package
> (because in its worldview the package was a upgrade so it needs a
> --unpack and then a --configure). This failed because the package was
> no longer there. 

Reading DpkgTerminalLog it seems update-notifier-common “replaced”
update-motd, thus dpkg disappeared it. The specific reason is that
update-motd was not completely empty, and still contained empty
directories that were also shipped by update-notifier-common, and dpkg
considers this an implicit Replaces.

Dpkg will not make a package disappear when upgrading to a version
that is (completely) empty.

> I would like to ask for a new force option that apt can use to turn
> this into a non-fatal error. Either a --force-no-purge-if-empty (or
> something similar) or a more broader --force-configure-bad (or a
> better matching name). I implemented the later and will attach it to
> this bugreport. But I'm also happy to do the former or solve it in a
> different way. The patch is against the current ubuntu version of
> dpkg, but it applies to current git.

I'd prefer to see apt not use even more ‘--force’ options (actually I'd
rather see apt not use any at all! :). The problem here seems to be
that apt does not have enough information to know that the package
disappeared in that dpkg run. But this should have been notified
through the status-fd channel (from modstatdb_note). OTOH I'm not sure
how apt parses those state changes. And it might be more useful to add
a: “log_action("disappear", otherpkg->name);” in process_archive()
after the «(Noting disappearance of ...» printf. What do you think?

regards,
guillem




--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to