4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cff63786e9 | |||
| bd38700f67 | |||
| 67a2931f5e | |||
| 3e897f4df8 |
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| cff63786e9 |
lib.Distro: Allow empty packages list
In commands taking lists of packages, namely install, delete and pkg_files, don't bother asking the backend. Uniformly log a warning and return successfully. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| bd38700f67 |
lib.Distro: Add .id
Allow to query the distribution ID a Distro was instantiated with via the .id property. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 67a2931f5e |
App: Support --verbose
Add the --verbose global option, which is made available as the App.verbose property. Some functions still take a verbose parameter, but the type of these parameters is converted from bool to bool|None. The idea is that, if they are None, their verbosity falls back to the global default. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
| 3e897f4df8 |
lib.Distro, ExecContext: Add classes, refactor lib.distro
The code below lib.distro, as left behind by the previous commit, is geared towards being directly used as a command-line API. This commit introduces the abstract base class Distro, a proxy for distribution-specific interactions. The proxy abstracts distro specifics into an API with proper method prototypes, not argparse.Namespace contents, and can thus be more easily driven by arbitrary code. The Distro class is initialized with a member variable of type ExecContext, another new class introduced by this commit. It is designed to abstract the communication channel to the distribution instance. Currently only one specialization exists, Local, which interacts with the distribution and root file system it is running in, but is planned to be subclassed to support interaction via SSH, serial, chroot, or chains thereof. Signed-off-by: Jan Lindemann <jan@janware.com> |