Subject: bug#15729: "make distclean", "./bootstrap", symlinks, and absolute pathnames

From: behoffski <[email-masked]>
Date: Sun, 27 Oct 2013 14:54:51 +1030

G'day,

I use "make distclean" regularly, before updating the sources from the Git
master and rebuilding.  I've been maintaining the sources in the top-level
directory "/home/grep-2.14/grep".

With the release of 2.15.1, I decided to rename the top-level directory
in-place to "/home/grep-2.15.1/grep".  This broke a number of things, because
there are quite a number of symlinks created during the bootstrap operation,
and almost all of these symlinks use an absolute path, rather than a relative
one.  (A sample of the links, created after re-running ./bootstrap, is
included below.)

I suspect that the bug is in my expectations:  Tree renaming (and/or similar
operations, such as cloning) is not supported by the sources once
"./bootstrap" has been executed.

I believe that a policy of changing all symlinks to use relative pathnames
would be developer-friendly.

I didn't see anything that could point to a defect in the 2.15.1 release,
but my knowledge of the overall sources (especially gnulib) is quite shallow.

cheers,

behoffski (Brenton Hoff)
Programmer, Grouse Software

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

# Sample of absolute-path symlinks visible after executing ./bootstrap:

./GNUmakefile -> /home/grep-2.15.1/grep/gnulib/top/GNUmakefile
./doc/gendocs_template -> /home/grep-2.15.1/grep/gnulib/doc/gendocs_template
./gnulib-tests/test-fcntl-safer.c -> /home/grep-2.15.1/grep/gnulib/tests/test-fcntl-safer.c
./gnulib-tests/signature.h -> /home/grep-2.15.1/grep/gnulib/tests/signature.h
./gnulib-tests/test-stdlib.c -> /home/grep-2.15.1/grep/gnulib/tests/test-stdlib.c
./gnulib-tests/test-wcrtomb-w32-1.sh -> /home/grep-2.15.1/grep/gnulib/tests/test-wcrtomb-w32-1.sh
         # ... many more gnulib-tests links...
./m4/fstat.m4 -> /home/grep-2.15.1/grep/gnulib/m4/fstat.m4
./m4/localcharset.m4 -> /home/grep-2.15.1/grep/gnulib/m4/localcharset.m4
./m4/quote.m4 -> /home/grep-2.15.1/grep/gnulib/m4/quote.m4
./m4/isnanf.m4 -> /home/grep-2.15.1/grep/gnulib/m4/isnanf.m4
./m4/xsize.m4 -> /home/grep-2.15.1/grep/gnulib/m4/xsize.m4
         # many more m4 links...
./lib/mbsrtowcs-impl.h -> /home/grep-2.15.1/grep/gnulib/lib/mbsrtowcs-impl.h
./lib/stpcpy.c -> /home/grep-2.15.1/grep/gnulib/lib/stpcpy.c
./lib/openat-die.c -> /home/grep-2.15.1/grep/gnulib/lib/openat-die.c
./lib/getdtablesize.c -> /home/grep-2.15.1/grep/gnulib/lib/getdtablesize.c
./lib/filenamecat-lgpl.c -> /home/grep-2.15.1/grep/gnulib/lib/filenamecat-lgpl.c
./lib/signbitl.c -> /home/grep-2.15.1/grep/gnulib/lib/signbitl.c
         # many more lib links...
./build-aux/vc-list-files -> /home/grep-2.15.1/grep/gnulib/build-aux/vc-list-files
./build-aux/gnu-web-doc-update -> /home/grep-2.15.1/grep/gnulib/build-aux/gnu-web-doc-update
         # A few more build-aux links omitted...

# Here are the relative-pathname symlinks that I found after executing ./bootstrap:

./build-aux/texinfo.tex -> ../gnulib/build-aux/texinfo.tex
./build-aux/depcomp -> ../gnulib/build-aux/depcomp
./build-aux/install-sh -> ../gnulib/build-aux/install-sh
./build-aux/config.sub -> ../gnulib/build-aux/config.sub
./build-aux/mdate-sh -> ../gnulib/build-aux/mdate-sh
./build-aux/config.guess -> ../gnulib/build-aux/config.guess
./INSTALL -> gnulib/doc/INSTALL