We are wrongly showing a warning message and disabling the install button on the
setup page on newly spun up AWS cloud images. This is a false positive since the
applications might be available in Debian but the apt caches are not updated.
Taking care of this issue as well.
The function returns None and not False to distinguish this as a case different
from returning a result about whether the package is unavailable or not.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Unavailable being a state can cause issues in several places in the where
there are currently only checks for 'needs-setup'
- Since it's only used in the UI, a method to check whether a module is
unavailable should be sufficient.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Created a django singal to indicate that a setup happened
- Clearing the cached list of firstboot_steps each time the above signal is sent
Closes#1193.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- 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.
- There shall be a setup helper object in every module. The setup
process will simply call methods in helper.
- Helper is responsible for loading/storing/checking module setup
versions.
- Methods help in showing progress of setup process automatically.