public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Mira Limbeck <m.limbeck@proxmox.com>
Subject: [pbs-devel] applied: [PATCH v2 proxmox-backup 2/2] add versions command to proxmox-backup-manager
Date: Wed, 11 Nov 2020 18:38:54 +0100	[thread overview]
Message-ID: <36cbccc4-340b-933b-63d7-921bc332a25b@proxmox.com> (raw)
In-Reply-To: <20201110132218.17717-2-m.limbeck@proxmox.com>

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@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.





  reply	other threads:[~2020-11-11 17:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 13:22 [pbs-devel] [PATCH v2 proxmox-backup 1/2] add extra_info field to APTUpdateInfo Mira Limbeck
2020-11-10 13:22 ` [pbs-devel] [PATCH v2 proxmox-backup 2/2] add versions command to proxmox-backup-manager Mira Limbeck
2020-11-11 17:38   ` Thomas Lamprecht [this message]
2020-11-12  9:12     ` [pbs-devel] [PATCH proxmox-backup] apt: use typed response for get_versions Stefan Reiter
2020-11-12  9:18       ` [pbs-devel] applied: " Thomas Lamprecht
     [not found]     ` <c16a8594-0f66-eadb-1063-d6309187a4e5@proxmox.com>
2020-11-12  9:29       ` [pbs-devel] applied: [PATCH v2 proxmox-backup 2/2] add versions command to proxmox-backup-manager Thomas Lamprecht
2020-11-11 11:59 ` [pbs-devel] [PATCH v2 proxmox-backup 1/2] add extra_info field to APTUpdateInfo Mira Limbeck
2020-11-11 17:33 ` [pbs-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36cbccc4-340b-933b-63d7-921bc332a25b@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=m.limbeck@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal