X-Spam-Check-By: sourceware.org Date: Wed, 7 Dec 2005 13:05:18 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "John W. Eaton" cc: cygwin AT cygwin DOT com, "James R. Phillips" Subject: Re: octave-forge dependency? In-Reply-To: <17303.8050.954774.161737@frodo.bogus.domain> Message-ID: References: <20051207153014 DOT 36506 DOT qmail AT web51505 DOT mail DOT yahoo DOT com> <439703E8 DOT 10701 AT equate DOT dyndns DOT org> <17303 DOT 8050 DOT 954774 DOT 161737 AT frodo DOT bogus DOT domain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, 7 Dec 2005, John W. Eaton wrote: > OK, let's back up a bit, and see why kpsexpand is needed in the first > place. Yes, let's. > Graphics in Octave use gnuplot. The legend function from Octave Forge > sends a "save FILE" command to gnuplot so that it can extract some > information about gnuplot's current state. If you do the following > > mv /usr/bin/kpsexpand. /usr/bin/kpsexpand-save > gnuplot > ... > gnuplot> save "foo" > > you should see the errors > > sh: kpsexpand: command not found Ok, so first off, octave-forge *shouldn't* depend on tetex-bin. If anything needs to depend on tetex-bin, it should be gnuplot. The presence of tetex-bin in octave-forge's requires: line is a packaging bug (even if it's intended to work around gnuplot's missing dependency). > So, why does gnuplot need kpsexpand to save state? Yes, why does it *need* kpsexpand/kpsewhich to save state? Looks like the kpsexpand command can easily fail with no adverse effects. The only problem is the error message -- so this looks to me to be a bug in gnuplot (either a minor one if all it does is display the message, or a major one if it stops processing the curr_fontpath array on such errors). > So gnuplot is using kpsexpand to locate some font files. > It looks like there are a couple of options. > > One is to set GNUPLOT_FONTPATH in the environment before calling > gnuplot. That would avoid the use of kpsexpand altogether, but will hard-code the paths. A better solution would be to use kpsexpand if it's available, and ignore it if it isn't (but this has to be done in gnuplot). > Another is to make a wrapper kpsexpand that looks for the real version > and does nothing if the real version is not present: > > #! /bin/sh > if [ -x /usr/bin/kpsexpand ]; then > exec /usr/bin/kspexpand "$@" > fi > > (though you might want to add some comments about why this is needed). Ugh. Why not just modify gnuplot to test whether an executable is present before blindly calling it? > If the real kpsexpand is not present, then chances are the font files > are not -either, so it should not matter that the corresponding > directories named in the fontpath are bogus. Bingo. > You could install the wrapper script in one of the directories in > Octave's DEFAULT_EXEC_PATH (for example, > /usr/lib/octave/2.1.72/exec/i686-pc-cygwin, where a couple of other > scripts are already installed), then it would only be found by Octave > and should not introduce any other conflicts. Either one is a reasonable hack pending the appropriate gnuplot change, but both are still hacks, IMO. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/