public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Fabian Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v6 proxmox-apt 04/11] add check_repositories function
Date: Fri, 18 Jun 2021 08:44:29 +0200 (CEST)	[thread overview]
Message-ID: <520390142.1284.1623998669889@webmail.proxmox.com> (raw)


> On 06/18/2021 8:42 AM Fabian Ebner <f.ebner@proxmox.com> wrote:
> >> +            Some((last, rest)) => match rest.split_last() {
> >> +                Some((second_to_last, _rest)) => {
> >> +                    (*last == "org" && *second_to_last == "debian")
> >> +                        || (*last == "com" && *second_to_last == "proxmox")
> >> +                }
> >> +                None => false,
> >> +            },
> >> +            None => false,
> >> +        };
> >> +
> >> +        for uri in self.uris.iter() {
> >> +            if let Some(host) = host_from_uri(uri) {
> >> +                let domains = host.split('.').collect();
> > 
> > ^ But instead of building a vector here, why not just do:
> > 
> >      if host == "proxmox.com" || host.ends_with(".proxmox.com")
> >          || host == "debian.org" || host.ends_with(".debian.org")
> >      {
> >          ...
> >      }
> > 
> 
> Misses FQDNs?

Such as?




             reply	other threads:[~2021-06-18  6:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  6:44 Wolfgang Bumiller [this message]
2021-06-18  6:53 ` Fabian Ebner
  -- strict thread matches above, loose matches on Subject: below --
2021-06-18  7:16 Wolfgang Bumiller
2021-06-18  7:26 ` Fabian Ebner
2021-06-18  6:56 Wolfgang Bumiller
2021-06-18  6:58 ` Fabian Ebner
2021-06-11 11:43 [pve-devel] [PATCH-SERIES v6] APT repositories API/UI Fabian Ebner
2021-06-11 11:43 ` [pve-devel] [PATCH v6 proxmox-apt 04/11] add check_repositories function Fabian Ebner
2021-06-17  8:39   ` Wolfgang Bumiller
2021-06-18  6:42     ` Fabian Ebner
2021-06-17 14:16   ` Fabian Grünbichler

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=520390142.1284.1623998669889@webmail.proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pbs-devel@lists.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