Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Use search path for scripts
Date: Thu, 17 Nov 2005 12:41:00 -0000	[thread overview]
Message-ID: <437C6D69.1030209@st.com> (raw)
In-Reply-To: <u3blw73ct.fsf@gnu.org>

Eli Zaretskii wrote:
>>Date: Wed, 16 Nov 2005 17:06:32 +0000
>>From: Andrew STUBBS <andrew.stubbs@st.com>
>>
>>The search strategy employed is the one we have found most useful. If 
>>the path contains '/' then search relative to current directory first, 
>>otherwise search the path first.
> 
> 
> How about trying in the current directory if the file name does not
> have any slash characters?  That sounds like the least surprising
> behavior, and also keeps backward compatibility.

We have a selection of scripts kept in the toolchain installation. These 
scripts are used to connect to and configure targets boards and 
simulators of many varieties. The scripts often reference one-another 
(sort of like an include statement) and in some cases are loaded lazily 
as required to keep the number of user-defined commands to a minimum.

For these scripts to find each other they would either have to have 
absolute paths hard-coded in - not a possibility because we do not 
mandate any particular install location - or else add the directory to 
the search path and reference the files by base name.

If the current directory was searched first then a users own scripts may 
accidentally (and silently) override the intended script causing a 
support headache.

In short, the chosen strategy ensures that our product always works as 
our customers expect.

In addition, this way round you can always specify which file you mean 
by adding './' whereas the other way round requires a lot more typing to 
say what you mean when it doesn't do what you expect. It would also 
require that the user search for the script themselves, and that isn't 
something your average customer is capable of (or so it seems). It 
certainly isn't something they want to do.

I do see what you mean about backwards compatibility though.

Andrew


  reply	other threads:[~2005-11-17 11:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 19:36 Andrew STUBBS
2005-11-17  0:04 ` Eli Zaretskii
2005-11-17 12:41   ` Andrew STUBBS [this message]
2005-11-17 19:42     ` Eli Zaretskii
2005-11-18 13:23       ` Andrew STUBBS
2005-11-18 14:53         ` Eli Zaretskii
2005-11-18 15:54           ` Andrew STUBBS
2005-11-25 18:02             ` Andrew STUBBS
2005-11-25 18:12             ` Daniel Jacobowitz
2005-11-25 18:33               ` Andrew STUBBS
2005-11-25 18:39                 ` Daniel Jacobowitz
2005-11-25 20:12                   ` Andrew STUBBS
2005-11-25 21:26                     ` Daniel Jacobowitz
2005-11-25 22:33                   ` Eli Zaretskii
2005-11-28 19:34                     ` Andrew STUBBS
2005-11-25 21:56                 ` Eli Zaretskii
2005-11-25 21:43               ` Eli Zaretskii
2006-01-12  0:09             ` Andrew STUBBS
2006-01-22 20:40               ` Daniel Jacobowitz
2006-01-23 16:29                 ` Andrew STUBBS
2006-01-23 17:41                   ` Andrew STUBBS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437C6D69.1030209@st.com \
    --to=andrew.stubbs@st.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox