Bug 203360 - games-rpg/nwn-1.68-r1: user preferences are not saved
Bug#: 203360 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: dju@gentoo.org
Component: Games
URL: 
Summary: games-rpg/nwn-1.68-r1: user preferences are not saved
Keywords:  
Status Whiteboard: 
Opened: 2007-12-26 09:22 0000
Description:   Opened: 2007-12-26 09:22 0000
Looks like symlinking *.ini files from /opt/nwn/ to ~/.nwn/${LANG}/ is not a
good idea: user preferences are not saved because of the files permissions
(owned by root:games and 0640 permissions). Furthermore, having *.ini files
under /opt/nwn/ disallows multiple users having their own personal settings.
Thus I suggest copying *.ini files instead of symlinking them.

The following patch is a dirty hack that works. Files ending by ".ini" are not
symlinked, they are created by nwn the first time it is run.

--- /opt/nwn/nwn        2007-12-26 09:59:36.000000000 +0100
+++ nwn 2007-12-26 09:41:28.000000000 +0100
@@ -37,7 +37,7 @@
 mkdir -p "${p}"
 find "${p}" -type l -delete
 for i in * ; do
-       if [[ ! -f ".metadata/linguas_${i}" ]]
+       if [[ ! -f ".metadata/linguas_${i}" && ${i: -4} != ".ini" ]]
        then
                cp -rfs ${dir}/${i} ${p}/. || die "copy ${i}"
        fi
@@ -50,11 +50,9 @@
        done
 fi
 cd "${p}" || die "cd ${p}"
-if [[ ! -a nwn.ini ]]; then
-       cp nwn.ini.default nwn.ini
-fi
 if [[ -r ./nwmovies.so ]]; then
        export LD_PRELOAD=./nwmovies.so:$LD_PRELOAD
 fi

------- Comment #1 From Chris Gianelloni (RETIRED) 2007-12-26 10:38:01 0000 -------
OK... sounds like something we definitely need to fix up.  Thanks for the
report, we'll get to it as soon as time permits.

------- Comment #2 From Denis Dupeyron 2007-12-26 17:24:01 0000 -------
I'll have a look at this. Plus that will be a good opportunity to unmask the
experimental ebuilds that has been p.masked for too long now.

Denis.

------- Comment #3 From Denis Dupeyron 2008-02-17 01:20:53 0000 -------
Fixed. Thanks for the patch.

Denis.