Re: new setup.exe crashes with kde's setup.ini
[Per instructions at http://kde-cygwin.sourceforge.net/kde2.php] On Thu, Jun 27, 2002 at 08:02:47PM +1000, Robert Collins wrote: AFAICT http://prdownloads.sf.net/kde-cygwin/setup.ini is not a valid setup.ini. It's a redirect page of some sort. Yes. They've been screwed by the download mirror system Sourceforge introduced on 2002-05-03. As I wrote when I changed prc-tools's .htaccess to deal with this: Update the redirect to cope with Sourceforge's new download mirror system. You'd think they could have implemented that without breaking all the old URLs, but no... They need to tell people to use http://us.dl.sourceforge.net/sourceforge/kde-cygwin/setup.ini (or similar) instead. That works fine in 2.249.2.4 but has a parse error in the 2.253 snapshot, perhaps because of the blank line at the end. (Hey, nice parse error message! That'll help if the bizarre parse error prc-tools's setup.ini was intermittently getting recurs.) John
Re: new setup.exe crashes with kde's setup.ini
On Thu, Jun 27, 2002 at 09:27:47PM +1000, Robert Collins wrote: (Hey, nice parse error message! That'll help if the bizarre parse error prc-tools's setup.ini was intermittently getting recurs.) Errm, Are you being sarcastic or literal here? I didn't mean to improve the parse error feedback, but if I have, then cool. Literal. With the kde-cygwin setup.ini I got parse error, unexpected LEX_EOF, expecting PACKAGE_NAME or NL or AT I think this means you're using a new bison with a whizzy new default error handler. Or maybe it's been like this for a while, and I didn't notice because the prc-tools one errored out so early. (Hmmm... and then when I went back to the mirrors page and hit Next again to redownload setup.ini, I got two copies of the error message. And then three the next time. And then...) John
Re: User URLs in setup.exe
On Thu, Jun 27, 2002 at 08:25:29PM +1000, Robert Collins wrote: 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. Copyright assignment isn't needed for setup.exe. (Searches archives... where did I get the idea that it was?) Oh, okay, oops. That's fine then. And uncivilised employment contracts aren't an issue in this case. Okay, no more excuses... it's about time I got set up to build setup.exe... Yes, lets turn it on it's head though: how does a user that *does* want that enter it via the GUI if we strip the final /? I was thinking of http://foo.com/foo%2f;, but apparently URL-encoding doesn't apply to slashes, and I have to go and reread the relevant RFC. (Probably there's an of course it doesn't apply to separators! involved here :-)) Never mind, then. John
User URLs in setup.exe
A few things are currently (2.249.2.4) interacting to make setup's user interface for adding User URLs extremely susceptible to typos. Suppose you have a bunch of packages living outside the usual set of Cygwin mirrors, so you tell your users to add (random example :-)) http://prc-tools.sourceforge.net/install to their list of mirror sites (i.e. on setup's site.cc page). Then 1. It gets listed as just http://prc-tools.sourceforge.net; so they can't tell if they actually typed it all in correctly. While I think hiding the details of the URL is good for the ones in mirrors.lst, I'm not sure it's right for ones the users type in themselves. 2. The URL's unique key in all_site_list is (derived from) the abbreviated one that's displayed, not the full URL. 3. If you type in another URL with the same key as one that's already in the list (say you're trying to fix a suspected (and invisible! :-)) typo), your new URL will get discarded (!) instead of overwriting the old one or appearing beside it (SitePage::OnMessageCmd, site.cc:418). Example: Add http://example.com/foo; as a User URL. Now try to add http://example.com/bar;. To get the change to stick you have to either manually delete /etc/setup/last-mirror and rerun setup, or ensure that http://example.com; is not selected and quit setup (thus getting it out of last-mirror) and rerun setup. Both of these are difficult to explain to clueless newbies, especially ones who don't believe that they could possibly have made a typo. Dumb user #1 example: user types in http://prc-tools.sourceforge.net/install/;, which sadly doesn't work. They get this error message: Unable to retrieve setup.ini from http://prc-tools.sourceforge.net/install/ so with luck they can see that they need to retype it. So they try again with http://prc-tools.sourceforge.net/install; and check it *really carefully* before they press Add. Unfortunately they can check it as much as they like; setup will ignore the change and they'll still get the same error. Dumb user #2 example: it turns out that instead of typing in the URL above, many of the users cutpaste it from the instructions Web page, which until today would often give them a trailing space. This would lead to an error message that looks like this: Unable to retrieve setup.ini from http://prc-tools.sourceforge.net/install and they *really* couldn't tell what they'd done wrong! And similarly trying to fix the invisible typo wasn't actually doing anything. I'm not sure what the right fix is. I think probably #2 above is right (because if http://example.com appears twice in the list but the full URLs behind them are different... that's confusing), but #1 and #3 are wrong. I suspect displayed_url for an URL that you type in yourself should be the full thing you typed, so that you can see it. (And then #3 would no longer be an issue.) If others agree (and want me to back my words with actions :-)), I'll send a patch to do this. 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: Index: site.cc === RCS file: /cvs/cygwin-apps/setup/site.cc,v retrieving revision 2.18 diff -u -p -r2.18 site.cc --- site.cc 6 May 2002 14:40:41 - 2.18 +++ site.cc 26 Jun 2002 13:54:51 - -25,6 +25,7 static const char *cvsid = #include stdio.h #include stdlib.h #include string.h +#include ctype.h #include process.h #include dialog.h -50,7 +51,13 list site_list_type, String, String::c void site_list_type::init (String const newurl) { - url = newurl; + char *spaces = newurl.cstr(); + char *space = spaces + strlen (spaces); + while (space spaces isspace (space[-1])) +--space; + *space = '\0'; + url = String (spaces); + delete[] spaces; char *dots = newurl.cstr(); char *dot = strchr (dots, '.'); It might also be worth stripping trailing '/' characters; if some mirror really needed to end in a space, you could presumably use %20 notation. Comments? Me, I'm not particularly comfortable about changing what the user typed in, but... If that turned out not to be a good idea, it might be worth making the spaces visible in the error message, e.g. like this: Index: res.rc === RCS file: /cvs/cygwin-apps/setup/res.rc,v retrieving revision 2.40 diff -u -p -r2.40 res.rc --- res.rc 12 May 2002 11:28:22 - 2.40 +++ res.rc 26 Jun 2002 13:54:51 - -439,7 +439,7 BEGIN IDS_CYGWIN_FUNC_MISSING Error: unable to find function `%s' in %s IDS_DOWNLOAD_SHORT Download error: %s too short (%d, wanted %d) IDS_ERR_OPEN_WRITE Can't open %s for writing: %s -IDS_SETUPINI_MISSINGUnable to get setup.ini from %s +IDS_SETUPINI_MISSINGUnable to get setup.ini from %s
Re: Setup 2.218.2.9 fails to read setup.ini file from prc-tools mirror
On Thu, May 30, 2002 at 09:02:12AM -0600, Carl Sorensen wrote: I am trying to install prc-tools on my WinXP machine, using cygwin setup 2.218.2.9. [...] (null) line 1: parse error, unexpected $undefined. (null) line 1: unrecognized line in setup.ini headers (do you have the latest setup?) Yes. This was happening intermittently while I was updating our little setup.ini, and would go away with random changes to the file, or even if I just saved it again. Or something. I couldn't figure out what was going on. I thought the problem had gone away, but now that it's gone live, I've been getting a few reports that it's failing for some people. Intermittently. (Uninitialised variable in the parser maybe?) The setup.ini in question is at http://prc-tools.sourceforge.net/install/setup.ini in case any experts can see what dumb mistake I've made. I've only got HEAD setup.exe sources, I haven't yet pulled down the current branch ones to try to figure out what the error messages are trying to tell me. I guess I should. Incidentally, contrary to the example at the end of http://sources.redhat.com/cygwin-apps/setup.html, my trial and error found that the quotation marks in sdesc were not optional. If so, maybe the example needs updating. John
setup (patch): add url ui glitch
Reproducible with the current 2.192.4.26 setup.exe: 1. in the mirror selection dialog, start with no mirrors selected, so that the Next button is not active 2. enter a User URL and press Add 3. your new mirror is selected, but Next is not active 4. click on your selected mirror -- it stays selected, and Next magically activates Suggested fix is below (I haven't tested it because I'm not set up to build setup, but it's Fairly Trivial (tm)). The official in the comment suggests that this was once intentional, but the behaviour in step 4 above seems to demonstrate that it doesn't make sense anymore. 2002-05-06 John Marshall [EMAIL PROTECTED] * site.cc (SitePage::OnMessageCmd): recalculate navigation button activation when Add is pressed. (SitePage::CheckControlsAndDisableAccordingly): tweak comment. --- site.cc.origMon May 6 11:09:22 2002 +++ site.cc Mon May 6 11:29:22 2002 @@ -338,7 +338,7 @@ SitePage::CheckControlsAndDisableAccordi // Check that at least one download site is selected. if (SendMessage (GetDlgItem (IDC_URL_LIST), LB_GETSELCOUNT, 0, 0) 0) { - // At least one official site selected, enable Next. + // At least one site selected, enable Next. ButtonFlags |= PSWIZB_NEXT; } GetOwner ()-SetButtons (ButtonFlags); @@ -423,6 +423,7 @@ bool SitePage::OnMessageCmd (int id, HWN // Update the list box. PopulateListBox (); + CheckControlsAndDisableAccordingly (); eset (GetHWND (), IDC_EDIT_USER_URL, ); } }