Hello David,
I found the circumstances in which 'ln -s' does not work properly.
This is when the current directory has non ASCII letters in its path. I
suspect that you have some MSDOS batch under the hood (... ?).
Anyway, my problem was not this non ASCII issue, I just came accross
this while trying to demonstrate another issue. With the current
directory w/o any non ASCII, if I run this script:
mkdir foo
cd foo
echo "Hello world!" > bar
mkdir hello
echo "Hello again!" > hello/bar2
mkdir gnats
cd gnats
ln -s ../* .
Then I get the following error :
ln: impossible de créer le lien symbolique './gnats' → '../gnats': File
name too long
So there are actually two issues with MSYS2 pseudo-symlinks :
- non ASCII letters (I don't care)
- this does not work : cd gnats; ln -s ../* .
Vincent.
Le 09/08/2017 à 14:59, Vincent Belaïche a écrit :
Hello David,
Le 09/08/2017 à 10:35, David Macek a écrit :
On 9. 8. 2017 0:15, Vincent Belaïche wrote:
Hello,
I am coming back to bug https://sourceforge.net/p/msys2/tickets/41/.
In the discussion of this problem it was said that
- msys2 does not used symlinks by default, because MSW applications do
not understand the symlinks
- when msys2 is configured to use symlinks, these are ``cygwin
symlinks'' and you need to operate with administrator rights.
You're misquoting the discussion. It should be:
MSYS2 doesn't create Cygwin-y symlinks (except special
circumstances), although it does understand them. It copies the
target instead, because "MSW" programs don't understand Cygwin-y
symlinks. It can be configured to create native NTFS symlinks, but
that has other
limitations<https://github.com/git-for-windows/git/wiki/Symbolic-Links>.
Sorry for misquoting. I must admit that I don't know the difference
between a cygwin-y symlink and a NTFS native symlinks. And I just
presume that MS implementation of symlinks is a superset of NTFS
native symlinks.
The URL that you give is interesting in this that it explains that MS
symlinks can be created by non-administrators provided that they are
given some corresponding priviledge.
Anyway, the project which I am interested in is using SVN, not GIT,
and to my knowledge SVN MSW clients can't be configured to follow
symlinks at the moment (sigh) whatever the user priviledges. Since
there are only a few of them, it is easy to have a work around by
having the makefile create the ``pseudo-symlink'' by ``ln -s'' when
applicable. I say pseudo-symlinks because there are'nt real symlinks,
just copies, and this does not really matter to me because this is not
a big about of data and makefile can keep pseudo-symlink synchronized
with its target.
What is more of a nuisance is the following ``ln -s'' does make the
pseudo-symlinks correctly for me in some circumstances. If I run the
following script:
mkdir foo
cd foo
echo "Hello world!" > bar
mkdir hello
echo "Hello again!" > hello/bar2
mkdir gnats
cd gnats
ln -s ../* .
I should have a pseudo-symlinks bar, and hello in foo/gnats that are a
copies of file foo/bar and directort foo/hello. However, it does not
work, I get the following:
ln: impossible de créer le lien symbolique './bar': No such file or
directory
ln: impossible de créer le lien symbolique './gnats': No such file or
directory
ln: impossible de créer le lien symbolique './hello': No such file or
directory
if now I try to make it a little smarter by making the pseudo-symlinks
one by one, ie I replace 'ln -s ../* .' by :
for w in $(ls .. | awk '!/^gnats$/{print}'); do
ln -s ../$w $w;
done
I get the following:
ln: impossible de créer le lien symbolique 'bar': No such file or
directory
ln: impossible de créer le lien symbolique 'hello': No such file or
directory
I seems that something go broken in my ln.exe. Is there anyway to have
pacman repair it ?
Vincent.
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users