This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] Add the last element of URL path to site chooser, if interesting.

On Sun, Nov 07, 2010 at 03:54:50PM +0000, Jon TURNEY wrote:
>On 06/11/2010 18:00, Christopher Faylor wrote:
>> On Sat, Nov 06, 2010 at 05:05:15PM +0000, Jon TURNEY wrote:
>>> Currently, if, for example, I manually add the site
>>> to setup's mirror list, I get two indistinguishable entries named
>>> Furthermore, because the code to ensure the site just added is selected uses the string inside the list control
>>> to locate elements, we end up with a random one of those two indistinguishable entries selected (usually the
>>> previously existing one).  This problem also prevents the selected sites being correctly saved and restored
>>> for the next setup run.
>>> So, to make the site chooser list entries unique and distinguishable, add the last element of the URL path to
>>> the site chooser, if it exists and isn't 'cygwin' (or some other alternatives used by current mirrors)
>>> (Also fix the logic for identifying protocol and site name part of the URL to find the first '/' after a '//',
>>> rather than the first '/' after a '.', to handle sitenames which aren't FQDNs correctly)
>> This is great, please check in.  I suspect that you're just trying a
>> local mirror or something but if there are actually sites in the mirror
>> list which are not proper FQDNs, please report them so that they can be
>> fixed in the mirror database.
>Yes, you are correct.  There are no sites in the mirror list which aren't
>FQDNs. I was just fixing what happens when you add 'http://localhost/cygwin/'
>(or some other locally-known non-FQDN) to the mirror list.
>Just to be clear, you want me to check in the whole patch, and not just that fix?

Actually, on reflection, I don't see a great benefit to parsing the UFL.
Why not just list the whole thing?  What would be more useful to the
Cygwin project would be to list the other information like country.

>It occurs to me now that the heuristic this code uses to determine if the last
>element of the path is 'interesting' could be broken by future official
>mirrors deciding to use something random.  Would you take a patch to
>mirrors.html saying something like "mirror the cygwin directory, not it's
>contents, so the URL for your mirror ends 'cygwin/'"?

mirrors.html is a generated file but, no, I don't want to enforce a
naming convention for the mirrors.  That seems like a headache I'd like
to avoid.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]