Hi!

On Tue, 2016-02-09 at 13:36:14 +0000, Sandro Tosi wrote:
> Package: dpkg
> Version: 1.18.3
> Severity: wishlist

> when a pkg installation fails, and then you run another apt-get command, it 
> will
> check the content of /var/lib/dpkg/updates and if there is any file, requests
> you to run sudo dpkkg --configure -a
> 
> The directory content check seems rather fragile, so it would be great if dpkg
> could provide a cli switch to inspect its internal status. This could be used 
> by
> apt, but also by alerting tools (such as nagios/icinga) or config mgmt tools
> (like pupper/cfengine) to assess the system status.

Hmm, I'm a bit conflicted by this request because the
/var/lib/dpkg/updates directory is used as a package metadata journal
or an update log. dpkg works perfectly fine with it as it parses the
status file and all journal entries and constructs the current state
in memory. It will also integrate those into the main status file once
any write operation is performed, such as removal or install for example.

apt is doing that check because it wants to be safe I guess, and
because files in the journal imply an abrupt termination of dpkg. But
the way to attest that the system is fine is by checking the status
contents through a dpkg interface, such as that all packages are in a
good known state through dpkg-query, or better via dpkg --audit.

Thanks,
Guillem

Reply via email to