From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Ken Brown <kbrown@cornell.edu>
Subject: Re: [PATCH setup] site.cc, site.h: code cleanup
Date: Wed, 22 Nov 2017 17:02:00 -0000 [thread overview]
Message-ID: <6bb98204-de00-8658-9415-6727aa59a550@dronecode.org.uk> (raw)
In-Reply-To: <20171120012615.10428-1-kbrown@cornell.edu>
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)
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?
Oh, you actually have a comment to that effect...
[1] https://cygwin.com/ml/cygwin-apps/2011-04/msg00014.html
[2] https://sourceware.org/cygwin-apps/setup.ini.html
next prev parent reply other threads:[~2017-11-22 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 1:26 Ken Brown
2017-11-22 17:02 ` Jon Turney [this message]
2017-11-23 20:47 ` Ken Brown
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=6bb98204-de00-8658-9415-6727aa59a550@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
--cc=kbrown@cornell.edu \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).