Parse "dpkg --status" instead of directly accessing /var/lib/dpkg/status
Directly accessing /var/lib/dpkg files is not recommended since that's dpkg's internals. "dpkg --status" is the external API for querying the status, which also honors dpkg's configured admindir.