bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57630] test-groff clobbers environment's GROFF_*_PATH variables


From: Bjarni Ingi Gislason
Subject: [bug #57630] test-groff clobbers environment's GROFF_*_PATH variables
Date: Sun, 19 Jan 2020 20:21:55 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #4, bug #57630 (project groff):


[comment #0 original submission:]
> The test-groff script simulates an installation by defining its own
GROFF_BIN_PATH, GROFF_FONT_PATH, and GROFF_TMAC_PATH values pointing to the
build directory.
> 
> Unfortunately, instead of appending to any existing values of these
variables, it overwrites them, so the user's environment is ignored.
> 
> For this script to more closely emulate running an installed groff, it
should prepend any existing values to the ones it defines.  This would make it
treat these variables the way a groff installation would, searching the user's
environment (if any) first, then the "system" one.
> 
> For example:
> 
> 
> if [ "$GROFF_FONT_PATH" ]
> then
>   GROFF_FONT_PATH="$GROFF_FONT_PATH$SEP"
> fi
> 
> GROFF_FONT_PATH=$GROFF_FONT_PATH\
> [... rest of script's normal definition for this variable ...]
> 

  I did this in my version of "test-groff", but without any check as I
knew the variable had a value.

  After reading this, I realised that my change was not that what I
wanted.

  The environment of "test-groff" should be contained to the git
repository with a possibility to add new sources to test (experiment
with).

  If something is wrong with that environment, I can compare it with my
standard environment by using the installed "nroff" or "groff".

  So I changed "GROFF_TMAC_PATH" to "TEST_GROFF_TMAC_PATH" to make it
independent of any standard environmental variable.

  One can obviously set

TEST_GROFF_TMAC_PATH=${GROFF_TMAC_PATH}

in ones environment,
if one wants to test (experiment) with that.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57630>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]