Add a version field to the Package class and make query_packages() fill it.
It's very much distribution and package dependent what shape that version
has, so from Package's perspective, it's just a str-typed member.
Further improvements and fixes:
- Make query_packages() accept throw, defaulting to the previous behaviour,
so a caller that wants to be prepared for a missing package / an empty
result can pass throw = False.
- Make dpkg's _run() and run_dpkg_query() forward ec and the remaining
keyword arguments on the sudo path, which dropped them before.
Add unit tests for the file type tree and its StatResult predicates.
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.4.0
Signed-off-by: Jan Lindemann <jan@janware.com>