* updating guile-tools: no more --scriptsdir
@ 2008-07-16 9:58 Thien-Thi Nguyen
2008-07-16 13:21 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2008-07-16 9:58 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
Greetings,
Please find below a patch, first in a short series, to update the guile-tools
script. I figure this is the best way to start harmonizing Guile 1.4.x and
official Guile. Please let me know if you would prefer it in some other
format.
thi
___________________________________________________
[-- Attachment #2: 0001-Remove-support-for-guile-tools-scriptsdir.patch --]
[-- Type: text/x-diff, Size: 2079 bytes --]
From 7006105990993e39e8a248d1203eebc0be42ef1c Mon Sep 17 00:00:00 2001
From: Thien-Thi Nguyen <ttn@gnuvola.org>
Date: Wed, 16 Jul 2008 11:50:28 +0200
Subject: [PATCH] Remove support for "guile-tools --scriptsdir".
* guile-tools.in: Delete "--scriptsdir" handling.
(help): Update.
Signed-off-by: Thien-Thi Nguyen <ttn@gnuvola.org>
---
ChangeLog | 7 +++++++
guile-tools.in | 11 +----------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index da26cbf..0b58be4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-16 Thien-Thi Nguyen <ttn@gnuvola.org>
+
+ Remove support for "guile-tools --scriptsdir".
+
+ * guile-tools.in: Delete "--scriptsdir" handling.
+ (help): Update.
+
2008-07-06 Ludovic Courtès <ludo@gnu.org>
* configure.in: Update to Autoconf 2.61.
diff --git a/guile-tools.in b/guile-tools.in
index a4db08f..50444f0 100644
--- a/guile-tools.in
+++ b/guile-tools.in
@@ -34,7 +34,6 @@ Usage: guile-tools --version
If PROGRAM is "list" or omitted, display contents of scripts dir, otherwise
PROGRAM is run w/ ARGS. Options (only one of which may be used at a time):
- --scriptsdir DIR -- Look in DIR for scripts
--guileversion VERS -- Look in $pkgdatadir/VERS/scripts for scripts
--source -- Display PROGRAM source (ignore ARGS) to stdout
@@ -53,10 +52,6 @@ if [ -d "$mydir/scripts" -a -f "$mydir/scripts/Makefile.am" ] ; then
default_scriptsdir=`(cd $mydir/scripts ; pwd)`
fi
-# option processing -- basically, you can override either the script dir
-# completely, or just the guile version. we choose implementation simplicity
-# over orthogonality.
-
case x"$1" in
x--version)
echo $0 $guileversion
@@ -68,11 +63,7 @@ x--help)
;;
esac
-if [ x"$1" = x--scriptsdir ] ; then
- user_scriptsdir=$2
- shift
- shift
-elif [ x"$1" = x--guileversion ] ; then
+if [ x"$1" = x--guileversion ] ; then
user_scriptsdir=$pkgdatadir/$2/scripts
shift
shift
--
1.5.3.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: updating guile-tools: no more --scriptsdir
2008-07-16 9:58 updating guile-tools: no more --scriptsdir Thien-Thi Nguyen
@ 2008-07-16 13:21 ` Ludovic Courtès
2008-07-16 19:45 ` Thien-Thi Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2008-07-16 13:21 UTC (permalink / raw)
To: guile-devel
Hello,
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> Please find below a patch, first in a short series, to update the guile-tools
> script.
I've never actually used that option, but can you provide rationale for
removing it? I'd rather not remove it without a good reason to do so.
> I figure this is the best way to start harmonizing Guile 1.4.x and
> official Guile.
Eh, that's good news! :-)
Thanks,
Ludovic.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: updating guile-tools: no more --scriptsdir
2008-07-16 13:21 ` Ludovic Courtès
@ 2008-07-16 19:45 ` Thien-Thi Nguyen
2008-07-18 10:04 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2008-07-16 19:45 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
() ludo@gnu.org (Ludovic Courtès)
() Wed, 16 Jul 2008 15:21:48 +0200
I've never actually used that option, but can you provide
rationale for removing it? I'd rather not remove it without a
good reason to do so.
It's not useful (you said it yourself). I bet that if we were to
omit the removal of this misfeature from NEWS, no one would even
notice. (Same goes for --guileversion and --help-all, which are
next up on the chopping block.)
For a preview of where i imagine official Guile's guile-tools
should go (not far), please find attached the Guile 1.4.1.118
variant. In terms of (re-)design rationale, the idea is to move
away from gratuitous variability:
[It was (sort of) nice that guile-tools could be used to mux
(dispatch) other functionality, but that sort of flexibility is
available by more standard means (e.g., set PATH env var).]
and towards reliable reflection:
[Many programs dispatched by guile-tools useful for maintaining
packages (config/build/install) have an invocation context of
either the configure script (produced by autoconf) or a makefile
(possibly, but not always, produced by automake). So, it's a
good idea to mesh well w/ the autoconf spirit of probing
features (instead of simply version numbers).]
I hope this explains the thought behind the 1.4.1.118 guile-tools,
which is the basis for this set of proposed (and to be proposed)
changes.
You can see the 1.4.1.118 guile-tools in action in Guile-PG's
configure.in (unreleased, see <http://www.gnuvola.org/wip/>),
lines 51 and 52, for example.
thi
________________________________________________________________
[-- Attachment #2: guile-tools.in --]
[-- Type: application/octet-stream, Size: 2576 bytes --]
#!/bin/sh
# Copyright (C) 2002, 2003, 2004, 2007, 2008 Thien-Thi Nguyen
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Usage: See `help' func below.
#
# TODO
# - handle pre-install invocation
# - "full" option processing (but see comment below)
#
# Author: Thien-Thi Nguyen
help ()
{
cat <<EOF
Usage: guile-tools [--source | --probe] PROGRAM
guile-tools [PROGRAM [ARGS ...]]
First invocation form:
-p, --probe -- If PROGRAM exists, display its full path and exit
successfully. Otherwise, simply exit failurefully.
--source -- Display PROGRAM source (ignore ARGS) to stdout.
Second invocation form: If PROGRAM is "list" or omitted,
display contents of scripts dir. Otherwise, run PROGRAM ARGS...
Note that some PROGRAMs may also take --help or --version.
Scripts dir: $scriptsdir
EOF
}
prefix="@prefix@"
exec_prefix="@exec_prefix@"
pkglibdir="@libdir@/@PACKAGE@"
guileversion="@GUILE_VERSION@"
scriptsdir="$pkglibdir/$guileversion/scripts"
case x"$1" in
x--version)
echo `basename $0` "(Guile)" $guileversion
exit 0
;;
x--help)
help
exit 0
;;
esac
if [ ! -d $scriptsdir ] ; then
echo $0: no such directory: $scriptsdir
exit 1
fi
if [ x"$1" = x -o x"$1" = xlist ] ; then
ls $scriptsdir
exit 0
fi
case "$1" in (-p | --probe)
maybe="$scriptsdir/$2"
test -f "$maybe" && test -x "$maybe" && echo "$maybe" && exit 0
exit 1 ;;
esac
if [ x"$1" = x--source ] ; then
if [ x"$2" = x ] ; then echo $0: need to specify program ; exit 1 ; fi
if [ -x $scriptsdir/$2 ] ; then
cat $scriptsdir/$2
exit 0
else
echo $0: no such program: $2
exit 1
fi
fi
program=$scriptsdir/$1
shift
if [ -x $program ] ; then
exec $program "$@"
else
echo $0: no such program: $program
exit 1
fi
# guile-tools ends here
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: updating guile-tools: no more --scriptsdir
2008-07-16 19:45 ` Thien-Thi Nguyen
@ 2008-07-18 10:04 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2008-07-18 10:04 UTC (permalink / raw)
To: guile-devel
Hello,
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> () ludo@gnu.org (Ludovic Courtès)
> () Wed, 16 Jul 2008 15:21:48 +0200
>
> I've never actually used that option, but can you provide
> rationale for removing it? I'd rather not remove it without a
> good reason to do so.
>
> It's not useful (you said it yourself).
I didn't say that. I suppose it can be useful in some situations, I
just never needed it myself.
One reason for this is that I rarely invoke `guile-tools' directly, but
rather through Autoconf macros or similar, as you noted. Another reason
is that a large part of the scripts `guile-tools' run is undocumented
and unmaintained.
> I bet that if we were to omit the removal of this misfeature from
> NEWS, no one would even notice. (Same goes for --guileversion and
> --help-all, which are next up on the chopping block.)
Maybe, but let's not try that. ;-)
> [It was (sort of) nice that guile-tools could be used to mux
> (dispatch) other functionality, but that sort of flexibility is
> available by more standard means (e.g., set PATH env var).]
Is it another way of saying the scripts could go into $bindir? Why not,
but that would mean cleaning up and documenting the scripts, removing
deprecated ones, and possibly prepending `guile-' to their names.
Thanks,
Ludovic.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-18 10:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 9:58 updating guile-tools: no more --scriptsdir Thien-Thi Nguyen
2008-07-16 13:21 ` Ludovic Courtès
2008-07-16 19:45 ` Thien-Thi Nguyen
2008-07-18 10:04 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).