User URLs in setup.exe

John Marshall
Wed Jun 26 18:55:00 GMT 2002

On Thu, Jun 27, 2002 at 06:27:36AM +1000, Robert Collins wrote:
> I always like patches. As for the right thing, how does this sound:
> For all urls (i.e. no special cases);
> Show one of: 
> * a friendly path provided in the mirrors.lst or last-mirror files.
> * the entire path

It sounds very good to me!  So add syntax (or just more parsing because
it's already there?) to mirrors.lst so setup.exe could display stuff
like  (Norway)

Cool :-).

I'm not sure how the friendly extra information would get into
last-mirror though.  If a last-mirror is from mirrors.lst then you've
got the information in mirrors.lst anyway, and otherwise it's a User URL
and you'd have to get the user to type it in, which seems over-the-top.

That change seems like something easily big enough for HEAD, and
probably it'd be over the threshold that I'd need to be copyright-
assigned.  That's doable, but it'll take time of course.

In the meantime, we have what I think is a serious UI bug in the 2002-06
branch:  people can't correct typos in User URLs without manipulating
last-mirror in a way that needs some expertise.

One way to fix that would be to change #3 (as defined in my previous
posting) so that adding an URL that happens to have the same key as an
existing one *does* overwrite it.  I think [1] the following surprisingly
simple patch achieves this:

---	Thu Jun 27 02:09:10 2002
+++	Thu Jun 27 02:24:41 2002
@@ -409,6 +409,7 @@ bool SitePage::OnMessageCmd (int id, HWN
 	    if (&listobj != newsite)
 		// That site was already registered
+		listobj = *newsite;

>> There is also the question of whether setup User URLs should be
>> susceptible to trailing slashes and spaces.  Here's a (ugly and
>> untested) patch that strips trailing spaces:
> I think this is the wrong thing to do. Us users shouldn't need to
> understand url encoding, which is why trailing '/'s and spaces are
> currently preserved. (because is a
> valid URL different from

Sure it's valid, and I agree with you, but to be really convincing
you'd have to demonstrate a situation in which someone actually *wanted*
that :-).  It's a UI question:  what proportion of the times that a user
types a trailing space or slash (so ends up with "[...]//setup.ini") do
they actually *intend* to do that?

For example, at the moment I'm getting real live bug reports because
morons insist on typing in ""
and "[...]/install//setup.ini" doesn't exist.

However, it occurs to me that the real solution to that is not to muck
with setup.exe, but for me to play more games with HTTP redirection on
my server.  So that's fine.


[1] This is just a gedankenexperiment; I still haven't got around to
    building setup.exe myself :-(

More information about the Cygwin-apps mailing list