base-files-mketc.sh
Have we heard from the maintainer of base-files-mketc.sh recently? About two months ago there was a discussion about putting Windows paths in the symlinks (to avoid problems when changing /cygdrive and with user dependent mounts), but the script was never updated. Pierre
RE: base-files-mketc.sh
From: Pierre A. Humblet Have we heard from the maintainer of base-files-mketc.sh recently? Yeah - I'm here ;) About two months ago there was a discussion about putting Windows paths in the symlinks (to avoid problems when changing /cygdrive and with user dependent mounts), but the script was never updated. Sorry, I either missed the conclusion of the thread or we never came to one... J.
RE: base-files-mketc.sh
On Sat, 5 Apr 2003, John Morrison wrote: From: Pierre A. Humblet Have we heard from the maintainer of base-files-mketc.sh recently? Yeah - I'm here ;) About two months ago there was a discussion about putting Windows paths in the symlinks (to avoid problems when changing /cygdrive and with user dependent mounts), but the script was never updated. Sorry, I either missed the conclusion of the thread or we never came to one... J. John, FWIW, I agreed with Pierre (and Max): http://cygwin.com/ml/cygwin-apps/2003-02/msg00033.html. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Knowledge is an unending adventure at the edge of uncertainty. -- Leto II
Re: base-files-mketc.sh
On Sat, Apr 05, 2003 at 02:00:33PM -0500, Igor Pechtchanski wrote: On Sat, 5 Apr 2003, John Morrison wrote: From: Pierre A. Humblet Have we heard from the maintainer of base-files-mketc.sh recently? Yeah - I'm here ;) About two months ago there was a discussion about putting Windows paths in the symlinks (to avoid problems when changing /cygdrive and with user dependent mounts), but the script was never updated. Sorry, I either missed the conclusion of the thread or we never came to one... FWIW, I agreed with Pierre (and Max): http://cygwin.com/ml/cygwin-apps/2003-02/msg00033.html. Yeah, it's unfortunate that we have to use win32 paths but it seems like the only solution in this case. cgf
base-files-mketc.sh
Having recently installed Cygwin on a new machine, I noticed that the symbolic links to the base files in /etc use Cygwin syntax (/cygdrive/c/). They break when /cygdrive is modified, which is frequently the case on a new install. It would be more robust (and easier and efficient) to use the Windows paths in the symlinks. Pierre
Re: base-files-mketc.sh
On Mon, 3 Feb 2003, Pierre A. Humblet wrote: Having recently installed Cygwin on a new machine, I noticed that the symbolic links to the base files in /etc use Cygwin syntax (/cygdrive/c/). They break when /cygdrive is modified, which is frequently the case on a new install. It would be more robust (and easier and efficient) to use the Windows paths in the symlinks. Pierre Pierre, FYI, base-files-mketc.sh uses the `cygpath -u ...` syntax to get the directory. Thus, if your cygdrive prefix is changed *before* the postinstall scripts run, the script should pick up the correct one. If you change your cygdrive prefix *after* the install, you're bound to break all kinds of things anyway, and you should verify that nothing on your system uses the old prefix. One possible compromise would be to allow user control of the cygdrive prefix from setup.exe... I'll look to see how much change that would require. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune
Re: base-files-mketc.sh
At 11:46 AM 2/3/2003 -0500, Igor Pechtchanski wrote: FYI, base-files-mketc.sh uses the `cygpath -u ...` syntax to get the directory. Yep, I saw that. Thus, if your cygdrive prefix is changed *before* the postinstall scripts run, the script should pick up the correct one. Currently impossible in a new install, and confusing to somebody just starting with Cygwin. If you change your cygdrive prefix *after* the install, you're bound to break all kinds of things anyway, and you should verify that nothing on your system uses the old prefix. AFAIR the only problems I had were the links in /etc What else do you think of? One possible compromise would be to allow user control of the cygdrive prefix from setup.exe... I'll look to see how much change that would require. Sure, but what's the problem with putting the Windows path in the symlink? That works just fine, I don't see what the trade-off is. Basically remove the cygpath -u you alluded to in the first paragraph. Pierre
Re: base-files-mketc.sh
On Mon, 3 Feb 2003, Pierre A. Humblet wrote: At 11:46 AM 2/3/2003 -0500, Igor Pechtchanski wrote: FYI, base-files-mketc.sh uses the `cygpath -u ...` syntax to get the directory. Yep, I saw that. Thus, if your cygdrive prefix is changed *before* the postinstall scripts run, the script should pick up the correct one. Currently impossible in a new install, and confusing to somebody just starting with Cygwin. Yes, I'm looking into that. I also had thought along the lines of your comment about it being confusing to new users. Perhaps, instead of making a whole bunch of new controls in one propsheet, we should have an Advanced... button that would pop up a dialog with all the extra options... What do people think? If you change your cygdrive prefix *after* the install, you're bound to break all kinds of things anyway, and you should verify that nothing on your system uses the old prefix. AFAIR the only problems I had were the links in /etc What else do you think of? Hmm, I'm not sure. You may be right for the moment (on a new install, in any case). However, any postinstall script using the `cygpath -u ...` syntax would have that problem, and who can guarantee that no others will be added in the future? One possible compromise would be to allow user control of the cygdrive prefix from setup.exe... I'll look to see how much change that would require. Sure, but what's the problem with putting the Windows path in the symlink? That works just fine, I don't see what the trade-off is. Basically remove the cygpath -u you alluded to in the first paragraph. Pierre If I understand the (new style) symlink implementation correctly, both the POSIX path and the Windows path are needed in the corresponding shortcut. IMHO, changing the cygdrive prefix is an advanced user action, and the user doing it should be aware of the consequences. One of them being that she has to check all the symlinks to make sure they aren't broken anymore. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune
Re: base-files-mketc.sh
At 12:29 PM 2/3/2003 -0500, Igor Pechtchanski wrote: What else do you think of? Hmm, I'm not sure. You may be right for the moment (on a new install, in any case). However, any postinstall script using the `cygpath -u ...` syntax would have that problem, and who can guarantee that no others will be added in the future? Igor, I don't understand your cygpath -u comment. It seems to behave correctly no matter what I do. If I understand the (new style) symlink implementation correctly, both the POSIX path and the Windows path are needed in the corresponding shortcut. I haven't looked into the implementation but doing ln -s 'c:\windows' win works perfectly fine for me. Dos dir shows a win.lnk, ls -l win shows the Windows path. Do you notice a problem when you try? Pierre
Re: base-files-mketc.sh
Igor Pechtchanski wrote: Perhaps, instead of making a whole bunch of new controls in one propsheet, we should have an Advanced... button that would pop up a dialog with all the extra options... What do people think? IMHO, changing the cygdrive prefix is an advanced user action, and the user doing it should be aware of the consequences. One of them being that she has to check all the symlinks to make sure they aren't broken anymore. Which means that if setup offers a nice easy way to do it, setup will have to assume the resposibility of doing the fixups. Not really feasible. I don't think this is a good thing for setup. If I understand the (new style) symlink implementation correctly, both the POSIX path and the Windows path are needed in the corresponding shortcut. No, I have succesfully tested symlinks to the Windows hosts file in mixed and win32 formats: $ ln -s C:\\WINDOWS\\system32\\drivers\\etc\\hosts hosts2 $ ln -s C:/WINDOWS/system32/drivers/etc/hosts hosts2 Both produce a valid symlink - which gives us an easy way out of this problem. Max.
Re: base-files-mketc.sh
On Mon, 3 Feb 2003, Pierre A. Humblet wrote: At 12:29 PM 2/3/2003 -0500, Igor Pechtchanski wrote: What else do you think of? Hmm, I'm not sure. You may be right for the moment (on a new install, in any case). However, any postinstall script using the `cygpath -u ...` syntax would have that problem, and who can guarantee that no others will be added in the future? Igor, I don't understand your cygpath -u comment. It seems to behave correctly no matter what I do. [snip] What I meant was that if any postinstall script created symlinks to the result returned by `cygpath -u ...`, those symlinks would be broken when the cygdrive prefix is changed. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune
Re: base-files-mketc.sh
On Mon, 3 Feb 2003, Igor Pechtchanski wrote: If I understand the (new style) symlink implementation correctly, both the POSIX path and the Windows path are needed in the corresponding shortcut. On Mon, 3 Feb 2003, Pierre A. Humblet wrote: [snip] I haven't looked into the implementation but doing ln -s 'c:\windows' win works perfectly fine for me. Dos dir shows a win.lnk, ls -l win shows the Windows path. Do you notice a problem when you try? Pierre On Mon, 3 Feb 2003, Max Bowsher wrote: No, I have succesfully tested symlinks to the Windows hosts file in mixed and win32 formats: $ ln -s C:\\WINDOWS\\system32\\drivers\\etc\\hosts hosts2 $ ln -s C:/WINDOWS/system32/drivers/etc/hosts hosts2 Both produce a valid symlink - which gives us an easy way out of this problem. Yes, this seems to work. I guess I just prefer seeing POSIX paths in symlinks... FWIW, I noticed another problem with the `cygpath -u` syntax: if the user has her own mounts for the C: drive, the symlink will reflect that mount, and thus will not work for other users on the machine. For example, I have $ mount | grep user c: on /mnt/c type user (binmode) $ and creating a symbolic link produces $ ln -s `cygpath -u 'c:\WINNT\system32\drivers\etc\hosts'` hosts $ ls -l hosts lrwxrwxrwx1 igor None 154 Feb 3 13:20 hosts - /mnt/c/WINNT/system32/drivers/etc/hosts $ which, of course, will not work for the other users on the machine. So it looks like both of you are right, and we need to use Win32 paths. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune
Re: base-files-mketc.sh
On Mon, 3 Feb 2003, Max Bowsher wrote: Igor Pechtchanski wrote: Perhaps, instead of making a whole bunch of new controls in one propsheet, we should have an Advanced... button that would pop up a dialog with all the extra options... What do people think? IMHO, changing the cygdrive prefix is an advanced user action, and the user doing it should be aware of the consequences. One of them being that she has to check all the symlinks to make sure they aren't broken anymore. Which means that if setup offers a nice easy way to do it, setup will have to assume the resposibility of doing the fixups. Not really feasible. I don't think this is a good thing for setup. True, but doesn't mean we can't do it on initial install, at least. We could also pop up a warning box... This actually gives merit to the idea of the Advanced button, since most users probably will not go there. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune
Re: base-files-mketc.sh
I guess it would have been simpler if I had sent the new version directly (tested on WinME) Pierre #!/bin/sh #-- # Create symbolic links from some /etc files to the Windows equivalents #-- FILES=hosts protocols services networks OSNAME=`/bin/uname -s` WINHOME=`/bin/cygpath -w -W` CYGWIN=$CYGWIN check_case:relaxed export CYGWIN case $OSNAME in CYGWIN_NT*) WINETC=$WINHOME\\system32\\drivers\\etc ;; CYGWIN_9*|CYGWIN_ME*) WINETC=$WINHOME ;; *) echo Unknown system type $OSNAME; exiting 2 exit 0 ;; esac if [ ! -d $WINETC ] then echo Directory $WINETC does not exist; exiting 2 echo If directory name is garbage you need to update your cygwin package 2 exit 0 fi for mketc in $FILES do if [ ! -e /etc/$mketc -a ! -L /etc/$mketc ] then # Windows only uses the first 8 characters WFILE=$WINETC\\`expr substr $mketc 1 8` /bin/ln -s -v $WFILE /etc/$mketc fi done
Re: base-files-mketc.sh
On Tue, 2003-02-04 at 05:26, Igor Pechtchanski wrote: True, but doesn't mean we can't do it on initial install, at least. We could also pop up a warning box... This actually gives merit to the idea of the Advanced button, since most users probably will not go there. 'Advanced' buttons are usually a form of unbreak me. We don't need an advanced button, nor do we need to change the /cygdrive/ prefix in setup. What we need is to install correctly regardless of the prefix, and to install in such a way that changing the prefix later will not break things. Fin. Rob -- GPG key available at: http://users.bigpond.net.au/robertc/keys.txt. signature.asc Description: This is a digitally signed message part
Re: base-files-mketc.sh
On Mon, Oct 28, 2002 at 04:37:49PM -0500, Igor Pechtchanski wrote: On Mon, 28 Oct 2002, Christopher Faylor wrote: Maybe someone will be kind enough to tell me what this is in reference to. The -l option in the cygpath distributed with the cygwin package prints out garbage. The same cygpath compiled anew works. The problem is described (among other places) here: http://cygwin.com/ml/cygwin/2002-09/msg00749.html Thank you for the URL. I believe I've fixed the problem. It was due to the incorrect protyping of GetLongPathName. The code in cygpath could use a good cleanup. I did a little but there is still a number of stylistic problems. I'm generating a snapshot now. cgf
Re: base-files-mketc.sh
On Wed, 30 Oct 2002, Christopher Faylor wrote: On Mon, Oct 28, 2002 at 04:37:49PM -0500, Igor Pechtchanski wrote: On Mon, 28 Oct 2002, Christopher Faylor wrote: Maybe someone will be kind enough to tell me what this is in reference to. The -l option in the cygpath distributed with the cygwin package prints out garbage. The same cygpath compiled anew works. The problem is described (among other places) here: http://cygwin.com/ml/cygwin/2002-09/msg00749.html Thank you for the URL. I believe I've fixed the problem. It was due to the incorrect protyping of GetLongPathName. The code in cygpath could use a good cleanup. I did a little but there is still a number of stylistic problems. I'm generating a snapshot now. cgf This fixed the problem: $ cygpath-old -w -l /cygdrive/c/WINNT/system32/drivers/etc/ 0? $ cygpath -w -l /cygdrive/c/WINNT/system32/drivers/etc/ c:\WINNT\system32\drivers\etc\ $ Thanks, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Water molecules expand as they grow warmer (C) Popular Science, Oct'02, p.51
base-files-mketc.sh
Hi John, It's true that it doesn't work with the broken cygpath, but it doesn't do anything bad in that case, and the bug is very clearly with the cygpath binary. One thought I had was to add the second line to this error message: echo Directory $WINETC does not exist; exiting 2 echo If directory name is garbage you need to update cygwin 2 Paul
RE: base-files-mketc.sh
From: Paul Johnston [mailto:paj;pajhome.org.uk] Hi John, It's true that it doesn't work with the broken cygpath, but it doesn't do anything bad in that case, and the bug is very clearly with the cygpath binary. One thought I had was to add the second line to this error message: echo Directory $WINETC does not exist; exiting 2 echo If directory name is garbage you need to update cygwin 2 Hi Paul, I'd admit to being happier if that was in there, but I'd be happier still if an updated cygpath.exe was added :) I don't know who the maintainer for that is... J. === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
RE: base-files-mketc.sh
From: Morrison, John [mailto:John.Morrison;uk.experian.com] (I hate replying to myself :( From: Paul Johnston [mailto:paj;pajhome.org.uk] Hi John, It's true that it doesn't work with the broken cygpath, but it doesn't do anything bad in that case, and the bug is very clearly with the cygpath binary. One thought I had was to add the second line to this error message: echo Directory $WINETC does not exist; exiting 2 echo If directory name is garbage you need to update cygwin 2 Hi Paul, I'd admit to being happier if that was in there, but I'd be happier still if an updated cygpath.exe was added :) I don't know who the maintainer for that is... Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? J. === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
Re: base-files-mketc.sh
Hi, Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? Yes, I agree. The problem was something to do with it being linked against the wrong version of a library. I think that Igor Pechtchanski, [EMAIL PROTECTED] knows the full details. Paul
RE: base-files-mketc.sh
From: Paul Johnston [mailto:paj;pajhome.org.uk] Hi, Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? Yes, I agree. The problem was something to do with it being linked against the wrong version of a library. I think that Igor Pechtchanski, [EMAIL PROTECTED] knows the full details. cfg needs to fix this before we can proceed. BTW, I'm going to be unavailable from Saturday, 2 Nov until Tuesday, 19 Nov and then I'm going to be busy catching up for a couple of days :( So if it's not done this week, it might take a few. Sorry. J. === Information in this email and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other commitment through the use of this email. Experian Limited (registration number 653331). Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
Re: base-files-mketc.sh
On Mon, 28 Oct 2002, Paul Johnston wrote: Hi, Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? Yes, I agree. The problem was something to do with it being linked against the wrong version of a library. I think that Igor Pechtchanski, [EMAIL PROTECTED] knows the full details. Paul Well, the full details are that I've re-linked cygpath from source and it worked. I don't know what it is with the build process employed by cgf that breaks cygpath... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Water molecules expand as they grow warmer (C) Popular Science, Oct'02, p.51
Re: base-files-mketc.sh
On Mon, Oct 28, 2002 at 10:00:47AM -0500, Igor Pechtchanski wrote: On Mon, 28 Oct 2002, Paul Johnston wrote: Hi, Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? Yes, I agree. The problem was something to do with it being linked against the wrong version of a library. I think that Igor Pechtchanski, [EMAIL PROTECTED] knows the full details. Paul Well, the full details are that I've re-linked cygpath from source and it worked. I don't know what it is with the build process employed by cgf that breaks cygpath... Maybe someone will be kind enough to tell me what this is in reference to. I've just downloaded the last few days of discussion which have the word cygpath in it and I don't see anything obvious. Apparently there was a discussion where John Morrison expressed reservations about the current broken behavior but all I see is the opinion that it should be fixed with no discussion about what it is. Please send the URL which discusses the problem to cygwin-apps. Thanks. cgf
Re: base-files-mketc.sh
On Mon, 28 Oct 2002, Christopher Faylor wrote: On Mon, Oct 28, 2002 at 10:00:47AM -0500, Igor Pechtchanski wrote: On Mon, 28 Oct 2002, Paul Johnston wrote: Hi, Cygpath is part of the cygwin package. I'm running the current latest 1.3.14-1, which was compiled on Wed, 23 Oct. It still has the bug. Perhaps this should be fixed first? Yes, I agree. The problem was something to do with it being linked against the wrong version of a library. I think that Igor Pechtchanski, [EMAIL PROTECTED] knows the full details. Paul Well, the full details are that I've re-linked cygpath from source and it worked. I don't know what it is with the build process employed by cgf that breaks cygpath... Maybe someone will be kind enough to tell me what this is in reference to. I've just downloaded the last few days of discussion which have the word cygpath in it and I don't see anything obvious. Apparently there was a discussion where John Morrison expressed reservations about the current broken behavior but all I see is the opinion that it should be fixed with no discussion about what it is. Please send the URL which discusses the problem to cygwin-apps. Thanks. cgf The -l option in the cygpath distributed with the cygwin package prints out garbage. The same cygpath compiled anew works. The problem is described (among other places) here: http://cygwin.com/ml/cygwin/2002-09/msg00749.html Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Water molecules expand as they grow warmer (C) Popular Science, Oct'02, p.51