]> skyeroc.xyz Git - dgamelaunch/commitdiff
fix all sorts of stuff with dgl-create-chroot
authorJoshua Kwan <joshk@triplehelix.org>
Sun, 9 Jul 2006 07:04:09 +0000 (07:04 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Sun, 9 Jul 2006 07:04:09 +0000 (07:04 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@344 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Changelog
dgl-create-chroot

index fa879345170fa5100e4acbaef6d7a1c17fcb6d41..2486ce9f6e8fa936fbfca7a0cf8cb814cc49d341 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,4 @@
-1.4.7 (2004/??/??)
+1.4.7 (2006/??/??)
        * Make the watching code more efficient (particularly on FreeBSD) and
          clean it up a bit.
        * Fix bug where old cruft was left under the watch list after 'm'
@@ -7,6 +7,11 @@
        * Use kqueue() if available (FreeBSD) to improve watching.
        * Update svn link.
        * Use $(DESTDIR) intelligently in installation procedure.
+       * Fix dgl-create-chroot to do a more intelligent $termdata check,
+         and to not choke on finding linux-gate.so.1 in ldd output (the file
+         does not actually exist. Also make the copy a dereferncing one, since
+         Debian now has a weird symlinking deal that makes it hard to accumulate
+         all the directories together.
 
 1.4.6 (2004/07/03)
        * Fix some signed/unsigned warnings.
index 76ed434d883e7017c690d906be3e07c3ce1345a7..f90c352b72ea43764c47ffc1665aa9acaebce32b 100755 (executable)
@@ -23,21 +23,26 @@ playground_fixed="/usr/lib/games/nethack"
 # variable data to create (leave blank to skip) (may be equal to previous)
 playground_var="/var/games/nethack"
 # termcap/terminfo (copied recursively) (leave blank to skip)
-if [ -d "/etc/terminfo" ]; then
-  termdata="/etc/terminfo"
-elif [ -d "/usr/share/lib/terminfo" ]; then
-  termdata="/usr/share/lib/terminfo"
-else
-  termdata="/usr/share/terminfo"
-fi
-
 [ -f dgl-create-chroot.conf ] && . ./dgl-create-chroot.conf
 
+if [ -z "$termdata" ]; then
+       for dir in /etc/terminfo /usr/share/lib/terminfo /usr/share/terminfo; do
+               if [ -e "$dir/x/xterm" ]; then
+                       termdata=$dir
+                       break
+               fi
+       done
+       if [ -z "$termdata" ]; then
+               echo "Error: couldn't find terminfo definitions. Please specify in 'termdata' variable." >&2
+               exit 1
+       fi
+fi
+
 findlibs()
 {
        for i in "$@"; do
                # () to ignore errors
-               ( ldd "$i" 2>/dev/null | awk '{ if ($2=="=>") print $3; }' )
+               ( ldd "$i" 2>/dev/null | awk '{ if ($2=="=>" && $1!="linux-gate.so.1") print $3; }' )
        done
 }
 findinpath()
@@ -128,7 +133,7 @@ fi
 if [ -n "$termdata" ]; then
        mkdir -p $chroot_path`dirname $termdata`
        if [ -d $termdata/. ]; then
-               cp -R $termdata/. $chroot_path$termdata
+               cp -LR $termdata/. $chroot_path$termdata
        else
                cp $termdata $chroot_path`dirname $termdata`
        fi