Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-10-09 Thread Gene Pavlovsky
Hey, sounds cool. Did you submit your patch to Cygwin devs? Are there plans for accepting it? On 7 October 2016 at 05:06, Rinrin wrote: > 在 2016/10/6 18:14, Gene Pavlovsky 写道: >> On 5 October 2016 at 06:00, Rinrin wrote: >>> Hi Gene: >>> I made a patch for my private use. >>> First of all,

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-10-06 Thread Rinrin
在 2016/10/6 18:14, Gene Pavlovsky 写道: > On 5 October 2016 at 06:00, Rinrin wrote: >> Hi Gene: >> I made a patch for my private use. >> First of all, you should setup `nativenocheck` in CYGWIN environment >> variable to enable this feature. >> If the target does not exist, it will check the l

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-10-06 Thread Gene Pavlovsky
On 5 October 2016 at 06:00, Rinrin wrote: > Hi Gene: > I made a patch for my private use. > First of all, you should setup `nativenocheck` in CYGWIN environment > variable to enable this feature. > If the target does not exist, it will check the last digit of target > path, for '/' it will c

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-10-04 Thread Marco Atzeri
On 05/10/2016 05:00, Rinrin wrote: Hi Gene: I made a patch for my private use. First of all, you should setup `nativenocheck` in CYGWIN environment variable to enable this feature. If the target does not exist, it will check the last digit of target path, for '/' it will create a instead o

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-10-04 Thread Rinrin
Hi Gene: I made a patch for my private use. First of all, you should setup `nativenocheck` in CYGWIN environment variable to enable this feature. If the target does not exist, it will check the last digit of target path, for '/' it will create a instead of 在 2016/4/30 8:14, Gene Pavlovsk

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-29 Thread Gene Pavlovsky
I can confirm this behavior. Basically, mklink requires to choose file (default) or directory (/D) link. It is true whether or not the target exists (e.g. if your target is a directory, /D is not implied automatically, you have to specify it). By contrast, POSIX symlink doesn't distinguish file or

RE: [cygwin] Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-29 Thread Jason Pyeron
> -Original Message- > From: Peter Rosin > Sent: Friday, April 29, 2016 8:03 AM > > On 2016-04-29 13:34, Gene Pavlovsky wrote: > >>> POSIX says a symlink to a missing target is perfectly > well-defined > >>> (you can't stat() through it, but you can readlink() it). But > >>> Windows nat

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-29 Thread Peter Rosin
On 2016-04-29 13:34, Gene Pavlovsky wrote: >>> POSIX says a symlink to a missing target is perfectly well-defined (you >>> can't stat() through it, but you can readlink() it). But Windows native >>> symlinks can't do that. So the problems you are encountering all stem >>> from the fact that you ar

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-29 Thread Gene Pavlovsky
> > POSIX says a symlink to a missing target is perfectly well-defined (you > > can't stat() through it, but you can readlink() it). But Windows native > > symlinks can't do that. So the problems you are encountering all stem > > from the fact that you are trying to make Windows do something it ca

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Andrey Repin
Greetings, Eric Blake! > On 04/28/2016 05:06 PM, Andrey Repin wrote: >>> Bottom line, I think the native symlink creation code should be >>> checked and a possibility should be added to create links to >>> non-existent targets, rather than the current behavior of failing. >> >> This is actually a

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Gene Pavlovsky
The list of errors that might be returned by symlink(2) mention target only 3 times: EFAULT target or linkpath points outside your accessible address space. ENAMETOOLONG target or linkpath was too long. ENOENT A directory component in linkpath does not exist or is

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Gene Pavlovsky
I don't know if POSIX standard has something to say about that, but here's a reference from GNU libc: `man 2 symlink`: > A symbolic link (also known as a soft link) may point to an existing > file or to a nonexistent one; the latter case is known as a dangling link. On 29 April 2016 at 02:

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Eric Blake
On 04/28/2016 05:06 PM, Andrey Repin wrote: >> Bottom line, I think the native symlink creation code should be >> checked and a possibility should be added to create links to >> non-existent targets, rather than the current behavior of failing. > > This is actually an arguable behavior, even in Li

Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Andrey Repin
Greetings, Gene Pavlovsky! > I have an issue to report: > Introduction: On a UNIX system, `ln -s target link` creates a link > regardless of target's existence. > This is used in some scripts, e.g. Gentoo's `run-crons` (which I also > use on Cygwin) uses a symlink pointing to the running process

`CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist

2016-04-28 Thread Gene Pavlovsky
Hello everybody! First post on this mailing list, my name is Gene, I'm from Russia, long-time Linux user, but had to use Windows as desktop for the last 8 years. Cygwin really helps me to keep my sanity! Thanks :) I have an issue to report: Introduction: On a UNIX system, `ln -s target link` cre