[pbs-devel] applied: [PATCH v2 proxmox-backup 2/2] add versions command to proxmox-backup-manager

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 11 18:38:54 CET 2020


On 10.11.20 14:22, Mira Limbeck wrote:
> Add the versions command to proxmox-backup-manager with a similar output
> to pveversion [-v]. It prints the packages line by line with only the
> package name, followed by the version and, for proxmox-backup and
> proxmox-backup-server, some additional information (running kernel,
> running version).
> 
> In addition it supports the optional output-format parameter which can
> be used to print the complete data in either json, json-pretty or text
> format. If output-format is specified, the --verbose parameter is
> ignored and the detailed list of packages is printed.
> 
> With the addition of the versions command, the report is extended as
> well.
> 
> Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
> ---
> v2:
>     - removed the special casing for running kernel and running version
>       as the get_versions result already contains the complete string
>     - fixed version string to print 'not correctly installed' instead of
>       'unknown' if no old_version is available
> 
>  src/bin/proxmox-backup-manager.rs | 78 +++++++++++++++++++++++++++++++
>  src/server/report.rs              |  1 +
>  2 files changed, 79 insertions(+)
> 
>

applied, thanks! I did a followup reducing this to a more unified code, chipping
of ~ 30 lines, single thing I'm unhappy with is the de-structuring and rebuilding
for slicing out the first package info in the non-verbose case, so if one has
better ideas/nicer code there...

What I found a bit weird that the verbose flag was effectively also triggered
indirectly, by setting an output-format.

One thing I noticed, the CLI argument parser does not recognizes the short option
here (-v) - just noting it.






More information about the pbs-devel mailing list