Skip to content

Rewrite and expand install&upgrade logic; implement delegate; provide example; bugfixes

Benjamin Vogt requested to merge bennr01/dbpinstaller:master into master

Warning: just like the last MR, this couldn't be 100% tested

Hi,

this MR finishes up most of the background rewrites. The authentication is still not implemented, though. Can we even provide this feature, given that we theoretically support 3rd party repositories?

Changes:

  • rewrite of the installation and update logic (includes a fix for the 'upgrade on multiple devices' bug
  • Package and App are now properly implemented (as opposed to be a wrapper around a dict)
  • the values returned by dbp.Dbpd.get_packages_list() are now also a proper class
  • delegate logic is now properly implemented. Download progress, cache update progress and warnings are properly relayed to delegates. Progress output was implemented for the PrintingInstallerDelegate used by the cli. Note: Currently, the repo site does not report the total size of the packages, making download progress unavailable.
  • no remaining print() or sys.exit() calls in the installer. All warnings are relayed to the delegate, all errors are raised as an exception.
  • the installation process no longer relies on manipulation the installer state. The installer is now mostly stateless.
  • app installation (and similiar logic) has been fully implemented. It is now possible to list and install apps.
  • various fixes and improvements across the board (TODO: the app and package files use different cases for their first letter. Is this intended?)
  • an example has been provided: examples/example_app_installer.py walks one trough the creation of a simple software to install an app from a list.

Merge request reports

Loading