This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [ANNOUNCEMENT]: Important change to symbolic link functionali ty


Christopher Faylor wrote:
> 
> I don't change my mount table very often but this is still potentially
> very surprising behavior for a user.  I don't think we should dismiss
> it lightly, as much as I like the idea of using .lnk files.

Perhaps a fix-symlinks tool that a user can run after changing the mount
table?  Something like this pseudo-code:

if $arg1 isa-dir
  cd $arg1
  find-all-symlinks in-and-below this directory
  for each fn in symlink-list ; do
    check internal dospath
    check internal cygwin path
    compare
    if nequal, 
      fix the dospath
  done
else if $arg1 isa-symlink
  check internal dospath
  check internal cygwin path
  compare
  if nequal, 
    fix the dospath
end
 
Yes, this program would be very time-consuming to run on a large tree
(like /), especially on large or populous file systems or remote-mounted
filesystems.  But you don't HAVE to run it -- Corinna's symlinks will
"just work" for cygwin tools; it's only that they *may* not work
properly from windows tools.

Here's the FAQ entry:

---------------------------------
My symlinks seem to point to different locations when accessed via
Explorer/DOS or BASH.

Symlinks contain both a dos path and a cygwin path.  The cygwin path is
interpreted using the current mount table every time the symlink is
accessed from a cygwin program.  The dos path is determined from the
cygwin path ONLY AT SYMLINK CREATION.  So, if you have changed your
mount tables
after creating the symlinks, it is possible that the internal dos path
and the cygwin path are 'out of sync'.  To fix this, you can run the
"fix-symlinks" program -- but be prepared for a long wait...it takes a
while.

  fix-symlinks /

---------------------------------

I just thought of another problem though -- if I put together a distro
tarball that contains symlinks, the dos paths will match MY system, and
not the user's system.  Unless part of the postinstall script is to run
fix-symlinks on the symlinks included in the installed package...

--Chuck

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]