Also run dpkg --audit to check if dpkg is in a broken state

This commit is contained in:
Alexandre Aubin 2020-05-13 16:38:27 +02:00
parent 4d734a27a0
commit 09d8500fda

View file

@ -95,6 +95,8 @@ def ynh_packages_version(*args, **kwargs):
def dpkg_is_broken(): def dpkg_is_broken():
if check_output("dpkg --audit").strip() != "":
return True
# If dpkg is broken, /var/lib/dpkg/updates # If dpkg is broken, /var/lib/dpkg/updates
# will contains files like 0001, 0002, ... # will contains files like 0001, 0002, ...
# ref: https://sources.debian.org/src/apt/1.4.9/apt-pkg/deb/debsystem.cc/#L141-L174 # ref: https://sources.debian.org/src/apt/1.4.9/apt-pkg/deb/debsystem.cc/#L141-L174