[cmake-developers] CMake libarchive bug? (not new...)

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sun Sep 15 15:08:16 EDT 2013


On 2013-09-14 15:08-0400 David Cole wrote:

> Ah, of course. A symlink. Thank you.
>
> Yes, I'm on Windows and using the pre-built binaries of CMake from cmake.org.
>
> It's annoying that cross-platform projects actually have symlinks in their 
> source trees.

Symbolic links are extremely useful and therefore used in a number of
cross-platform software projects that are primarily developed on
Linux.  So projects like subversion (and git?) recognize this
situation and replace the symlink with the corresponding file copy for
platforms such as Windows that do not have good symlink support.

I strongly feel that tarball unpacking software should follow this
same course as well rather than asking all cross-platform projects to
give up symlinks on platforms that support them.

The approach of replacing symlinks by equivalent file copies is used
by the MSYS tar.exe command, but there is a bug for the case
(http://sourceforge.net/p/mingw/bugs/2002/) where the symlink is
unpacked ahead of the corresponding file because then the file doesn't
exist at the time it is needed for the file copy when the symlink is
unpacked. A workaround for this issue is to unpack the tarball twice
(which might also work around the symlink in tarball issue that was
originally reported by Dave).

But a true cure for this issue is for the tar command to unpack
symlinks after all ordinary files are unpacked. This should be
straightforward to implement within the tar command; instead of
unpacking symlinks immediately make a list of them to be unpacked
after all ordinary files are unpacked.

Unfortunately some naysayer type who hates symlinks tried to poison
the well for bug 2002, but if you read past his negativity the actual
MSYS tar developer was amenable to such a solution. So perhaps if this
idea is forwarded to the libarchive project as well, they might be
willing to make such a straightforward change themselves.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



More information about the cmake-developers mailing list