From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76765 invoked by alias); 23 Nov 2017 20:47:42 -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 76693 invoked by uid 89); 23 Nov 2017 20:47:41 -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=headache, Brian, mirrors, site X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.13.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 20:47:40 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id vANKlcpk011809; Thu, 23 Nov 2017 15:47:38 -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 vANKlaIk026618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 23 Nov 2017 15:47:37 -0500 Subject: Re: [PATCH setup] site.cc, site.h: code cleanup To: Jon Turney , cygwin-apps@cygwin.com References: <20171120012615.10428-1-kbrown@cornell.edu> <6bb98204-de00-8658-9415-6727aa59a550@dronecode.org.uk> From: Ken Brown Message-ID: Date: Thu, 23 Nov 2017 20:47: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: <6bb98204-de00-8658-9415-6727aa59a550@dronecode.org.uk> Content-Type: text/plain; charset=utf-8; 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/msg00103.txt.bz2 On 11/22/2017 12:02 PM, Jon Turney wrote: > On 20/11/2017 01:26, Ken Brown wrote: >> Remove site_list_type::init(), which was introduced to work around a >> problem with gcc-2.95. > > Please tell me we're not actually using a placement new for these things :S > >> Add a bool member 'is_official' to the site_list_type class.  Use it >> to distinguish official mirrors (listed in mirrors.lst) from >> user-added sites.  This replaces the (undocumented) use of >> site_list_type::servername.size() for this purpose. >> >> When registerSavedSite is called on a URL that's already in >> 'all_site_list', add the version from 'all_site_list' to 'site_list' >> rather than adding a temporary version that contains no information >> other than the URL. >> >> Similarly, if the user adds a site that was already in >> 'all_site_list', don't replace the existent version with the new one >> (which contains only the URL). > > This is a nice bit of cleanup. > > My only concern is with the terminology "is_offical". > > In general, this code suffers from confusion between (i) package > repository [a set of packages], and (ii) mirrors [a set of sites > offering the same package repository] > > (See also the musings in [1]. I have a vague recollection that I > actually started writing some code to do some of that, but that would be > in an old CVS checkout somewhere) I agree with what you wrote there. A lot of things would be clearer if we distinguished between mirrors of the Cygwin repo and general package sources. Trying to use the two simultaneously is what's giving Brian a headache in the "make setup mirror list..." thread. > We have the concept of a label for the package set ('release:' in > setup.ini [2]) > > To me "is_official" gives the idea that this flag means "the package set > at this URL is the package set with the label 'cygwin'", but actually it > just means "this URL was read from mirrors.lst", so maybe it could be > named something like that? Yeah, maybe "from_mirrors_lst"? Ken