public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH proxmox master stable-2 1/2] apt: repos: extend `Codename` by `Unknown` variant
Date: Tue, 6 Feb 2024 09:48:29 +0100 (CET)	[thread overview]
Message-ID: <990490647.2281.1707209309110@webmail.proxmox.com> (raw)
In-Reply-To: <362b0156-16d4-40d6-9eb0-6bea947e7092@proxmox.com>


> >  
> > -                if Some(codename) == current_codename.next() {
> > -                    add_info("ignore-pre-upgrade-warning", message_new(base_suite));
> > -                } else if codename > current_codename {
> > -                    add_info("warning", message_new(base_suite));
> > +                match current_codename.next() {
> > +                    name if name == codename => {
> > +                        add_info("ignore-pre-upgrade-warning", message_new(base_suite));
> > +                    }
> > +                    DebianCodename::Unknown(_, _) if codename > current_codename => {
> > +                        add_info("warning", message_new(base_suite));
> > +                    }
> > +                    _ => {}
> 
> Like this, the warning is lost when we match a known codename that is
> newer than the current one. What is the issue with the current code you
> are trying to address?

There is no issue with the current code, I just refactored it to use the newly introduced variant instead of the Option.
Am I missing something? This should behave just like the code before.

> 
> As for the match, you could pull in the case where the suite is older
> (the if block just above this code) and rather do an exhaustive match.




  reply	other threads:[~2024-02-06  8:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 17:08 Christian Ebner
2024-02-05 17:08 ` [pve-devel] [PATCH proxmox stable-2 2/2] apt: repos: Remove unneeded unwrap for codename variant Christian Ebner
2024-02-06  8:29 ` [pve-devel] [PATCH proxmox master stable-2 1/2] apt: repos: extend `Codename` by `Unknown` variant Fiona Ebner
2024-02-06  8:48   ` Christian Ebner [this message]
2024-02-06  8:59     ` Fiona Ebner
2024-02-06  9:26       ` Christian Ebner

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=990490647.2281.1707209309110@webmail.proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pve-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