Use apt-get for installing packages
Created by: SunilMohanAdapa
- Use action helper so that Plinth can run unprivilaged and action script can run as root.
- Use Status-Fd feature of apt-get to report progress. Don't report much detail.
- Capture all stderr of the apt-get process and present it only in case of failure.
- Remove package installation using PackageKit. Remove dependency on PackageKit.
- Merge --setup package installation with regular package installation.
This should fix the following problems:
- PackageKit throws errors when APT encounters an error and later corrects them and proceeds well. This is reported upstream but not fixed.
- PackageKit does not install recommends by default and there is no easy way to tell it to do so.
- In some rare cases, PackageKit could get stuck for interactive input even though interactive flag is set to false.
- PackageKit does not work without network manager connections. (Could have been mitigated by altering packagekit configuration).
- PackageKit glib library leaks file descriptors after each operation. This leads to running out of fds during long running refresh operations such as OpenVPN setup. (This should have subsided by not checking package install with the new setup mechanism.)]
Known issues:
- In development mode, inside action scripts the python modules are always loaded from system path and not development directory.
- With PackageKit it is possible to run multiple operations simultaneously. Others would wait while the first is being installed. With new implementation, the others error out unable to obtain lock.
Testing:
- Tested
plinth --setup
works properly. - I have tested building a fresh image and
plinth --setup
works okay according to logs. I assumed the image would work just fine. - I have reset all module setup version and removed all packages. Then for each module I have installed from Plinth and that works successfully.
- Triggered errors during installations and made sure the errors are shown up properly.
- Tested that download progress and install progress are show properly.
- Tested that invalid module name or package name fails to install.