From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105061 invoked by alias); 23 Nov 2017 21:07:51 -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 105046 invoked by uid 89); 23 Nov 2017 21:07:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=inglis, Brian, Inglis, downloaded X-HELO: limerock01.mail.cornell.edu Received: from limerock01.mail.cornell.edu (HELO limerock01.mail.cornell.edu) (128.84.13.241) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 21:07:49 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id vANL7kTm012780 for ; Thu, 23 Nov 2017 16:07:47 -0500 Received: from [192.168.1.148] (c-73-69-84-56.hsd1.ct.comcast.net [73.69.84.56]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id vANL7f91020595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Thu, 23 Nov 2017 16:07:42 -0500 Subject: Re: [PATCH] make setup mirror list more like web page not just urls To: cygwin-apps@cygwin.com References: <09c0dc5b-f975-42a9-a204-b02edef6a3ad@SystematicSw.ab.ca> <53a8001e-10ae-6318-ba3d-31d0cfa18f14@SystematicSw.ab.ca> <88f044cc-2f14-94ef-1110-7b3853a088ee@SystematicSw.ab.ca> From: Ken Brown Message-ID: <2c7d6401-e6c9-f2d3-8d20-a15a943e058d@cornell.edu> Date: Thu, 23 Nov 2017 21:07:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <88f044cc-2f14-94ef-1110-7b3853a088ee@SystematicSw.ab.ca> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00105.txt.bz2 On 11/22/2017 11:42 AM, Brian Inglis wrote: > On 2017-11-20 15:59, Ken Brown wrote: >> On 11/20/2017 4:30 PM, Brian Inglis wrote: >>> On 2017-11-17 06:53, Jon Turney wrote: >>> On 11/17/2017 8:48 AM, Ken Brown wrote: >>>> On 15/11/2017 21:35, Brian Inglis wrote: >> The issue of recognizing a URL that's already in the list is not fixed. Here's >> what I tried: >> >> I ran setup with the last mirror (as stored in /etc/setup/setup.rc) being >> http://mirrors.kernel.org/sourceware/cygwin/.  The resulting mirror list display >> contained the following, highlighted: >> >>   Org - Kernel - http://mirrors.kernel.org >> >> So setup didn't recognize that http://mirrors.kernel.org/sourceware/cygwin/ was >> already in the list, displayed as >> >>   United States - California - http://mirrors.kernel.org > > Should have been working so I added more LOG_BABBLE and it looks like setup.rc > is processed at the start as you would expect, but it is merged into empty site > lists, as mirrors.lst is downloaded only after you say you can, and proxy > settings, in a separate download thread: see attached. > And do you know where the cached list comes from - that seems to keep old > mirrors around from testing, but I can't find any cached list with the test > mirrors appearing in the list - I would expect that to come from setup.rc - but > appears to be loaded when mirrors.lst is. > So we need to defer adding the last mirror with some kind of lazy evaluation > hooked after cached mirrors and/or mirrors.lst is available. > If we have a setup.rc, I would expect the cached mirrors site list loaded from > there at startup, before the last mirror is merged (and found!). > Can make those changes but would like ny assumptions questioned, corrected, or > validated! I'm not aware of any place previously used sites could come from other than setup.rc. Are you sure your test mirrors aren't listed there? The fact that mirrors.lst is merged into all_site_list after the last-mirror list shouldn't prevent a site in mirrors.lst from replacing one with the same URL. load_site_list() tries to do exactly that. I think the problem is that 'find (theSites.begin(), theSites.end(), newsite)' is using an operator== based on the key instead of the URL. Changing that as you suggested in a different message might fix the problem, but I haven't thought about whether it could cause problems elsewhere. Ken