Use python apt library
This is especially true for the part that allow users to install / remove metapackages. As of now we run dpkg
in a loop, it's slow and ugly.
There's a Python library to deal with the apt cache, query installed packages, and so on... We should use it.
... 5 months later ...
But wait, we also like to keep kali-tweaks light on dependencies, so that it can be be part of minimal Kali installs. Right now it only requires python3
, plus python3-newt
for the UX.
Adding an additional dependency on python3-apt
would bring in:
$ apt show python3-apt
Depends: python3 (<< 3.10), python3 (>= 3.9~), python3:any, libapt-pkg6.0 (>= 1.9.11~), libc6 (>= 2.14), libgcc-s1 (>= 3.0), libstdc++6 (>= 11), python-apt-common, distro-info-data
Recommends: lsb-release, iso-codes
At the moment, I don't know if it's really worth it. Maybe those libraries are already part of a "minimal Kali install" anyway?
Edited by Arnaud Rebillout