This includes list of packages for which conffile prompts will be shown. For
each package current version of the package, new version of the package and list
of configuration files that were modified.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is optional and does not affect normal installations. However, when
performing configuration migration in FreedomBox (due to unattended-upgrades
refusing it), it is useful as a part of strategy to read configuration, force
install new configuration files and apply configuration again. This option can
be used on such cases.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- This is a fallback solution to manually refresh package lists on AWS images
since they come with no apt package lists.
- This can also be occasionally useful for people running the testing
distribution where packages might be frequently added and removed.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
async is a reserved keyword in Python 3.7. It can no longer be used as method
parameter. Change the name so that we are ready for Python 3.7.
See: https://www.python.org/dev/peps/pep-0492/#deprecation-plans
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.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.
I got an error when one of the sources in my sources.list is untrusted.
The error code was available as 'gpg-error' and more description was
available. Our untested code to handle that threw an exception in that
case. This patch fixes it. I have tested with the error I got as the
error was easily reproducible.
Python 3.2.x is deprecated, so I thought it would be
good to get tests running on some newer pythons. I've
switched from the python3-gi package to using 'pgi' from
pypi, because the apt-installed python3-gi was having trouble
importing.
pgi required python 3.3+ (see: https://pypi.python.org/pypi/pgi),
so I've removed python 3.2 from the test matrix. Let me know if
we're using python 3.2 anywhere, but as far as I know plinth is
run on python 3.4.3 with debian sid on the freedombox image.
Specify the version of a library before importing it using GObject
introspection. Mainly to avoid warnings with recent version of
pygobject. Closes#247.
When an ActionError is raised during pre_install or on_install action,
the error is not being shown. Instead an error is being raised. This
fixes that.
- Refresh package list before trying to install packages. Also lookup
the ID of the package, including the version, using the newly fetched
package list.
- Call on_install() callback requested by modules only if the package
installation was successful. Handle any exception raised in the
callback itself.
- Handle exceptions raised during packagekit operations. Also check the
returned results for error code.
- Capture error/success status during a transaction. Don't destroy the
transaction object until the error/success status has been collected.
When a view is refreshed after completion of a transaction collect the
result of the transaction and show it to the user.
- Handle cases where package searches in the package list fails. Simply
show the package name without its description.
- Uses PackageKit dameon, Glib library wrapping packagekit DBUS API and
Python bindings for the Glib library.
- Implement a decorator to wrap views requiring packages.
- Framework allows for parallel operations. However, doing parallel
operations hangs because of what appears to be PackageKit backend
limitations.