From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28933 invoked by alias); 7 Dec 2017 19:08:22 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 28379 invoked by uid 89); 7 Dec 2017 19:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: out3-smtp.messagingengine.com Received: from out3-smtp.messagingengine.com (HELO out3-smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 19:08:20 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 73E1B20A8F for ; Thu, 7 Dec 2017 14:08:17 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 07 Dec 2017 14:08:17 -0500 X-ME-Sender: Received: from [192.168.1.102] (host86-179-113-49.range86-179.btcentralplus.com [86.179.113.49]) by mail.messagingengine.com (Postfix) with ESMTPA id 1067E7E7AD for ; Thu, 7 Dec 2017 14:08:16 -0500 (EST) Subject: Re: [PATCH setup v3 0/6] Distinguish between user URLs and cygwin mirrors in UI To: cygwin-apps@cygwin.com References: <20171206204559.4756-1-kbrown@cornell.edu> <3831ea27-382b-6b53-d6be-79e933823d34@SystematicSw.ab.ca> <9a4de343-2f13-11e2-44d8-403d22483b51@SystematicSw.ab.ca> From: Jon Turney Message-ID: <279db881-4bbf-30ba-d30b-fac6c0aff373@dronecode.org.uk> Date: Thu, 07 Dec 2017 19:08:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2017-12/txt/msg00041.txt.bz2 On 07/12/2017 15:07, Ken Brown wrote: > On 12/7/2017 8:55 AM, Jon Turney wrote: >> On 06/12/2017 22:15, Brian Inglis wrote: >>> On 2017-12-06 14:55, Ken Brown wrote: >>>> On 12/6/2017 4:07 PM, Brian Inglis wrote: >>>>> On 2017-12-06 13:45, Ken Brown wrote: >>>>>> This is a followup to >>>>>>     https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html, >>>>>> in which Jon suggested splitting site selection into two pages, one >>>>>> for cygwin.com mirrors and one for additional user URLs.  The latter >>>>>> would be visible only if the user had previously checked a suitable >>>>>> checkbox.  This patch series implements that suggestion. >> >> Thanks very much for looking at this. >> >> This looks pretty good. >> >> My main concern is how this deals with private cygwin mirrors.  I >> guess you need to not select anything at the "choose a mirror page", >> then tick "allow sites that are not cygwin.com mirrors" to get to the >> page that lets you enter the URL, which is somewhat confusing. >> I'm going to guess that private cygwin mirrors are used more than >> repos of additional packages. > > I hadn't thought about that.  I'll try to think of different terminology > to make it clear that the first page is for mirrors listed on > https://cygwin.com/mirrors.html, and the second page is for private > mirrors and other repos of packages.  I'll try to send v4 with these Hmm... I don't think that's perhaps the best direction to be heading in. > changes later today and you can see if it looks better. > >> (Another facet to consider: At the moment, I think we do something >> like trying all the keys we know to validate the signature of every >> setup.ini we download. It would be nice to maintain an idea of which >> URLs are supposed to be validated using the cygwin signing key.) > > After my patches, I think 'all_mirror_list' is precisely the list of > such URLs.  Maybe I should rename it to 'official_mirror_list' or > something similar? No, because private cygwin mirrors (by which I just mean a mirror whose URL isn't published in mirrors.lst) can't be in that list. >> I guess we could achieve this by keeping the 'Add URL' control on the >> mirrors page, but then the migration becomes a big problem (as we >> don't know if a URL is a mirror or not until we read it) >> >> (I'm not sure migrating anything not in mirrors.lst to the usersite >> list as you currently do is the best idea, as it will migrate the >> currently selected mirror if it happens to be stale when we are run?) > > I tried to handle stale mirrors correctly in this snippet from patch 2: > > +      if (i->from_mirrors_lst) > +    mirror = true; > +      else if ((j = find (cached_mirror_list.begin (), > cached_mirror_list.end (), *i)) > +           != cached_mirror_list.end ()) > +    { > +      // It's a stale mirror. > +      mirror = true; > [...] > +      if (mirror) > +    { > +      result.push_back (*i); > [...] > +      else > +    { > +      merge_site (all_usersite_list, *i); Yes, you are right. This whole thing of "remember the mirror list from last time so we can see if this site came from it", rather than explicitly remembering that for the site is a bit odd, though.