Re: Cygwin symlinks
Thomas Leonard <[email protected]> Sat, 3 Oct 2015 10:55:31 +0100
| Newsgroups | gmane.comp.file-systems.zero-install.devel |
|---|---|
| Message-ID | <CAG4opy-3hjFfJFXjwOa3XXafu3xRPEd8U5r+tDny2OU3k+FfrQ@mail.gmail.com> |
On 2 October 2015 at 14:50, Bastian Eicher <[email protected]> wrote: > I recently tried to update the Msysgit/Git for Windows feed [1] but ran into > a little roadblock: Upon first launch newer versions of Git for Windows > execute a set of post-install scripts that create a couple of hardlinks and > Cygwin symlinks [2]. Since Zero Install implementations cannot be modified > once they have been added to cache these scripts failed. > > Cygwin symlinks [2] are regular files that are marked with the "System" file > system attribute and begin with a "magic string" identifying them as a > symlink followed by the target path. Any application compiled with Cygwin or > Mingw (such as Git for Windows) will treat these files like "real" symlinks. > > The obvious solution was to simply create an archive of the Git installation > after the scripts had run. Two issues with that: > * Most archiving tools on Windows do not detect hardlinks so a number of > files would be added to the archive twice. > * Most archiving tools and Zero Install itself know nothing about Cygwin > symlinks. > > So far Zero Install for Windows extracts symlinks in ZIP or TAR archives as > regular files containing the target path and lists them in a special > .symlink file. I have decided to change this behavior in the next release to > create Cygwin symlinks instead. > > Additionally I have added classes to the backend library for creating ZIP > and TAR archives while preserving hardlinks and Cygwin symlinks. I haven't > quite decided how to expose this in the frontend yet. I was thinking > something like this: > 0install store export DIGEST OUTPUT-ARCHIVE [MIME-TYPE] > 0install archive INPUT-DIRECTORY OUTPUT-ARCHIVE [MIME-TYPE] > > Any feedback/suggestions? Sounds good. The non-Windows 0install command doesn't have any commands for creating archives, but leaves that to separate tools. It might even be worth contributing your patches to the Windows tar port. That seems more logical than putting a tar-creator in 0install itself. > [1] http://0install.de/feeds/Msysgit.xml > [2] http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks -- Dr Thomas Leonard http://roscidus.com/blog/ GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA ------------------------------------------------------------------------------