This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: mknetrel ./bin symlinks


I've traced the recent report about dangling symlinks in the tetex
package:

    http://sources.redhat.com/ml/cygwin-apps/2002-09/msg00091.html

to a small bug in mknetrel.  Find a fix below.

The bug and fix can be viewed using mknetrel's readlink () and
dousrstuff () functions and doing something like:

    cd /tmp
    rm -rf usr/bin
    mkdir -p usr/bin
    cp -pv /home/cygwin/usr/bin/cygcheck.exe usr/bin/dot.exe
    cp -pv /home/cygwin/usr/bin/cygcheck.exe usr/bin/nodot

    (cd usr/bin
    ln -s dot.exe lndot.exe
    ln -s nodot lnnodot)

    cd usr
    dousrstuff
    ls -l usr/bin

Greetings,
Jan.


2002-09-18  Jan Nieuwenhuizen  <janneke@gnu.org>

	* bin/mknetrel (dousrstuff): Fix for symlinks to executable in
	./bin dir.


Index: bin/mknetrel
===================================================================
RCS file: /cvs/cygwin-apps/mknetrel/bin/mknetrel,v
retrieving revision 1.39
diff -p -u -u -r1.39 mknetrel
--- bin/mknetrel	14 Jul 2002 04:29:33 -0000	1.39
+++ bin/mknetrel	18 Sep 2002 13:34:54 -0000
@@ -271,7 +271,7 @@ dousrstuff() {
 
     rm -rf i686-pc-cygwin
 
-    for f in bin/*; do
+    (cd bin && for f in *; do
 	case "$f" in
 	    *.exe|*\*) continue ;;
 	esac
@@ -285,7 +285,7 @@ dousrstuff() {
 		ln -s $ln.exe $f.exe
 		;;
 	esac
-    done
+    done)
 
     for f in bin/* sbin/*; do
 	case "$f" in

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]