trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: April 2012

Re: [trinity-devel] Request help revising starttde

From: Darrell Anderson <humanreadable@...>
Date: Mon, 9 Apr 2012 15:36:36 -0700 (PDT)
> As I mentioned in previous posts, the current mechanism in
> starttde causes $TDEDIRS to be ignored when $XDG_DATA_DIRS
> is explicitly defined in the environment.
> 
> This is what we need to add to the existing snippet
> regarding $XDG_DATA_DIRS:
> 
> * When $TDEDIRS is not defined in the environment, do
> nothing additional. Leave functionality as is.
> 
> * When $TDEDIRS is defined then parse that variable into
> separate directories. Use those separate directories to form
> the $XDG_DATA_DIRS variable.
> 
> Notes:
> 
> Explicitly declaring $XDG_DATA_DIRS will override $TDEDIRS,
> which must then be explicitly identified in the
> $XDG_DATA_DIRS string to remain useful. When $XDG_DATA_DIRS
> is not explicitly declared, then $TDEDIRS is recognized and
> works as intended. Therefore we need to compensate when
> explicitly declaring $XDG_DATA_DIRS.
> 
> The $TDEDIR variable is intended to be singular and $TDEDIRS
> plural. When $TDEDIRS exists in the environment then parse
> that variable into separate directories.
> 
> By design, $TDEDIRS should contain whatever is set in
> $TDEDIR. Therefore any additional directories set in
> $TDEDIRS are intended to override data files found in
> $TDEDIR. In both $TDEDIRS and $XDG_DATA_DIRS, those
> additional directories should be placed before $TDEDIR and
> before /usr/share.
> 
> In $XDG_DATA_DIRS, $TDEDIR should be placed before
> /usr/share to ensure those data files override anything in
> /usr/share.
> 
> For example, on my system I have the following:
> 
> $TDEDIR=/opt/trinity
> $TDEDIRS=/usr/local/tde-mods:/opt/trinity
> 
> Therefore in my system, $XDG_DATA_DIRS should look like
> this:
> 
> XDG_DATA_DIRS=/usr/local/tde-mods/share:/opt/trinity/share:/usr/share
> 
> I know of no limitations for expanding $TDEDIRS.
> Theoretically then, $TDEDIRS could contain more than two
> directories, but the last directory in the $TDEDIRS variable
> should always be what is defined in $TDEDIR.
> 
> For example, the following presumably could exist:
> 
> $TDEDIR=/opt/trinity
> $TDEDIRS=/usr/local/tde-mods:/opt/tde-mods:/opt/trinity
> 
> Therefore $XDG_DATA_DIRS would look like this:
> 
> XDG_DATA_DIRS=/usr/local/tde-mods/share:/opt/tde-mods/share:/opt/trinity/share:/usr/share

I posted a patch to starttde in bug report 675 (http://bugs.pearsoncomputing.net/show_bug.cgi?id=675).

The patch works here. Please test.

Thanks.

Darrell