From: Fiona Ebner <f.ebner@proxmox.com>
To: Christian Ebner <c.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:59:34 +0100 [thread overview]
Message-ID: <0acb22d3-bad0-4fac-af0c-3ccfcbbd5ada@proxmox.com> (raw)
In-Reply-To: <990490647.2281.1707209309110@webmail.proxmox.com>
Am 06.02.24 um 09:48 schrieb Christian Ebner:
>
>>>
>>> - 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.
>
You only match the current codename and DebianCodename::Unknown(_, _).
Any known newer codename will just fall through to the default arm (and
the default arm can/should be avoided by pulling in the check for the
older codename from above).
next prev parent reply other threads:[~2024-02-06 9:00 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
2024-02-06 8:59 ` Fiona Ebner [this message]
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=0acb22d3-bad0-4fac-af0c-3ccfcbbd5ada@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=c.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