Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Bjarni Ingi Gislason Newsgroups: gnu.groff.bug Subject: [bug #57630] test-groff clobbers environment's GROFF_*_PATH variables Date: Sun, 19 Jan 2020 20:21:55 -0500 (EST) Lines: 63 Approved: bug-groff@gnu.org Message-ID: References: <20200118-223928.sv93119.50528@savannah.gnu.org> <20200119-065054.sv108747.44939@savannah.gnu.org> <20200119-125106.sv97361.53025@savannah.gnu.org> <20200119-145610.sv93119.40026@savannah.gnu.org> <20200120-012155.sv93188.90981@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1579483320 7351 209.51.188.17 (20 Jan 2020 01:22:00 GMT) X-Complaints-To: action@cs.stanford.edu To: "G. Branden Robinson" , Dave , Bjarni Ingi Gislason , Ingo Schwarze , bug-groff@gnu.org Envelope-to: bug-groff@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.79] X-Savane-Project: groff X-Savane-Tracker: bugs X-Savane-Item-ID: 57630 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 X-Apparently-From: 31.209.211.187 (Savane authenticated user bjarniig) In-Reply-To: <20200119-145610.sv93119.40026@savannah.gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.79 X-BeenThere: bug-groff@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Bug reports for the GNU version of nroff, troff et al" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200120-012155.sv93188.90981@savannah.gnu.org> X-Mailman-Original-References: <20200118-223928.sv93119.50528@savannah.gnu.org> <20200119-065054.sv108747.44939@savannah.gnu.org> <20200119-125106.sv97361.53025@savannah.gnu.org> <20200119-145610.sv93119.40026@savannah.gnu.org> Xref: csiph.com gnu.groff.bug:1677 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: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/