Re: MSYS using Junctions quirk
Earnie Boyd <[email protected]> Tue, 28 Aug 2012 08:12:54 -0400
| Newsgroups | gmane.comp.gnu.mingw.msys |
|---|---|
| Message-ID | <CA+sc5mn1R5q6x2-NtM+pvbONshz1BtmEGA+2pcjJj8kFyo260A@mail.gmail.com> |
On Mon, Aug 27, 2012 at 6:12 PM, dmccunney wrote: > I'm not sure whether I'm encountering a bug or just getting bitten by > lack of knowledge. > The latter is what I'm thinking. BTW, support for MSYS happens on mingw-user, the documentation needs changed. > > NTFS5 supports hard links for files and junctions for directories. I > use Hermann Schinagl's Link Shell Extension > (http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html) > which provides context menu entries to create and manipulate such > things. Under Win2K/WinXP it does hard links out of the box. Under > Vista/Win7 it supports proper symbolic links, too.* > > I wanted a *nix like file system, so I used LSE to create a junction, > and have Msys/1.0/bin appear as /bin. That works fine. I > subsequently decided I'd prefer it to appear as /usr/bin, deleted the > old junction, and created a new one. That did *not* work fine. The > junction was created, /usr/bin shows in the file system and I can list > the files in it, but attempting to actually execute any of them fails. > I can type the command at the prompt and I simply return to the > prompt with the command not actually running. If I create the > junction as /bin, things work. It appears Msys tools only work > correctly through junctions created off of root, and fail if the > junction is created off a sub-directory. This seems to be Msys > specific, as I have other sets on Win32 ports of *nix utilities, like > the Gnuwin32 collection, that do work as expected. > > Right now, I have Msys mapped via a junction as /bin, and can live > with it. But I'm curious: *should* creating the junction as /usr/bin > have worked, or am I running into an inherent limit in how Msys works, > or have I found a bug? > Why? When you start the MSYS shell it maps itself already to / and /usr. What are you trying to accomplish? > * And too my surprise, a recent update to LSE pointed to an open > source driver written by a Japanese developer that enables true > symlinks in 2K and XP. NTFS5 has the underlying infrastructure to > support symlinks, but it's not exposed by the 2k/XP kernel. The > driver amends that oversite. MSYS when I forked Cygwin to develop it did not have a Windows junction or a Windows symlink to rely on and the way Cygwin had emulated it did not work for a native application. Therefore it was removed and the functions return ENOSYS error. -- Earnie -- https://sites.google.com/site/earnieboyd ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/