public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: James Gregurich <bayoubengal@mac.com>
To: "cygwin-developers@cygwin.com" <cygwin-developers@cygwin.com>
Subject: Re: utility to update existing cygwin symlinks to native format? (was Re: native symlink)
Date: Tue, 30 Apr 2013 01:19:00 -0000	[thread overview]
Message-ID: <B225793A-09C6-4E2C-B257-5A7FAF7E990E@mac.com> (raw)
In-Reply-To: <517F13D1.8040105@cwilson.fastmail.fm>


On Apr 29, 2013, at 5:44 PM, Charles Wilson wrote:

> On 4/29/2013 8:34 PM, James Gregurich wrote:
>> On Apr 29, 2013, at 5:25 PM, Christopher Faylor  wrote:
>>> If you're asking "Did Corinna write a utility to do this?" the answer
>>> is extremely likely to be "No" since she would have mentioned it if
>>> she had.
>>> 
>>> If you're asking "Will Corinna write a utility to do this?" I suspect
>>> that the answer is likely also "No".
>> 
>> Unfortunately, the utility is a necessity for practical use of the native symlink feature.  I'm not opposed to writing it if I can get the necessary public function exposed in path.cc.  I suppose the discussion can be tabled until she gets back. At a bare minimum, I'd need a function that returns the format of the symlink in question. With such a function, I could just delete the link and recreate it if the format is not native.
> 
> The winln program is part of the most recent cygutils package (1.4.12). It was written by Daniel Colascione...
> 


Reading the man-page you supplied, it doesn't sound like this utility is intended to replace an existing default symlink with a native one. 

The issue I see with this utility in terms of using it as a replacement for 'ln -s' is that it defaults to a file symlink type if the target does not exist. The desired behavior would be to fall back to the default implementation so that the directory tree is never invalid.  Also, if you are using software that has embedded calls to 'ln -s' or uses the symlinks() API call, this wouldn't help.


However, (with a little inspiration from Jeffery), I did think of a way to do it without further changing cygwin.  One could use the Win32 APIs to verify that a target file is a reparse point symlink. if it isn't, then one could delete it and recreate it through cygwin.  I will attempt that approach and report back in the near future.


-James



  reply	other threads:[~2013-04-30  1:19 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 15:17 64 bit Cygwin 1.7.18-12 Corinna Vinschen
2013-03-27 21:54 ` native symlink James Gregurich
2013-03-27 22:41   ` Larry Hall (Cygwin Developers)
2013-03-31 15:55     ` Jeffrey Altman
2013-04-01 16:17       ` Larry Hall
2013-04-01 19:25     ` James Gregurich
2013-04-01 19:52       ` Christopher Faylor
2013-04-01 22:03         ` James Gregurich
2013-04-02  0:06           ` Christopher Faylor
2013-04-03  0:49             ` James Gregurich
2013-04-03  1:41               ` Christopher Faylor
2013-04-03  3:16                 ` James Gregurich
2013-04-03  4:33                   ` Jeffrey Altman
2013-04-03 15:29                     ` Corinna Vinschen
2013-04-03 16:32                       ` Larry Hall
2013-04-03 16:51                         ` Jeffrey Altman
2013-04-03 16:52                       ` Jeffrey Altman
2013-04-03 17:29                         ` Corinna Vinschen
2013-04-03 20:46                           ` Corinna Vinschen
2013-04-03 21:35                             ` Jeffrey Altman
2013-04-11 16:03                               ` Corinna Vinschen
2013-04-11 21:55                             ` Jeffrey Altman
2013-04-12  8:33                               ` Corinna Vinschen
2013-04-13 13:08                                 ` Jeffrey Altman
2013-04-13 14:54                                   ` Corinna Vinschen
2013-04-03 21:31                       ` James Gregurich
2013-04-24 10:35                       ` Corinna Vinschen
2013-04-24 12:06                         ` Jeffrey Altman
2013-04-24 12:50                           ` Corinna Vinschen
2013-04-24 17:52                             ` James Gregurich
2013-04-24 17:56                             ` Jeffrey Altman
2013-04-24 18:14                               ` Corinna Vinschen
2013-04-24 18:16                                 ` Jeffrey Altman
2013-04-26 23:39                                 ` James Gregurich
2013-04-29 22:05                                   ` utility to update existing cygwin symlinks to native format? (was Re: native symlink) James Gregurich
2013-04-29 23:45                                     ` Larry Hall (Cygwin Developers)
2013-04-29 23:49                                       ` James Gregurich
2013-04-29 23:52                                         ` James Gregurich
2013-04-30  0:25                                         ` Christopher Faylor
2013-04-30  0:34                                           ` James Gregurich
2013-04-30  0:44                                             ` Charles Wilson
2013-04-30  1:19                                               ` James Gregurich [this message]
2013-05-03 21:53                                                 ` native symlink support should fallback to default format if target missing James Gregurich
2013-05-13 15:00                                                   ` Corinna Vinschen
2013-05-13 15:25                                                     ` Jeffrey Altman
2013-05-13 15:40                                                       ` Corinna Vinschen
2013-05-13 18:59                                                         ` Christopher Faylor
2013-05-13 19:47                                                           ` Earnie Boyd
2013-05-14 14:52                                                             ` James Gregurich
2013-05-14 15:04                                                               ` Corinna Vinschen
2013-05-14 15:54                                                                 ` Jeffrey Altman
2013-05-14 16:07                                                                   ` Corinna Vinschen
2013-05-14 21:04                                                                     ` James Gregurich
2013-05-14 16:42                                                                   ` Christopher Faylor
2013-05-14 21:11                                                                     ` James Gregurich
2013-05-15  2:28                                                                       ` Christopher Faylor
2013-05-15 15:07                                                                         ` James Gregurich
2013-05-14 21:04                                                                   ` James Gregurich
2013-05-14 15:31                                                               ` Christopher Faylor
2013-05-13 15:00                                   ` native symlink Corinna Vinschen
2013-05-13 15:12                                     ` Charles Wilson
2013-05-13 15:39                                       ` Corinna Vinschen
2013-05-13 20:54                                         ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B225793A-09C6-4E2C-B257-5A7FAF7E990E@mac.com \
    --to=bayoubengal@mac.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).