zsh-workers
 help / color / mirror / code / Atom feed
* Version-dependent functions install path
@ 2000-01-06  7:04 Andrej Borsenkow
  2000-01-06  8:06 ` dev-14 problem - can't load zsh/complete " Andrej Borsenkow
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrej Borsenkow @ 2000-01-06  7:04 UTC (permalink / raw)
  To: ZSH workers mailing list

I suggest, that functions are being installed in version-specific directories as
well. Unfortunately (and that applies to the development builds in the first
place) it is often impossible to mix binaries and functions from different
versions. Just think about added computil module :-) Currently it is hard to
revert back to previous version (better said, I often want to keep several
versions to test the difference. As it stands now, you cannot simply run old
binary because functions are already changed).

/andrej



^ permalink raw reply	[flat|nested] 7+ messages in thread

* dev-14 problem - can't load zsh/complete RE: Version-dependent functions install path
  2000-01-06  7:04 Version-dependent functions install path Andrej Borsenkow
@ 2000-01-06  8:06 ` Andrej Borsenkow
  2000-01-06 10:50 ` Oliver Kiddle
  2000-01-06 20:20 ` Peter Stephenson
  2 siblings, 0 replies; 7+ messages in thread
From: Andrej Borsenkow @ 2000-01-06  8:06 UTC (permalink / raw)
  To: Andrej Borsenkow, ZSH workers mailing list

> I suggest, that functions are being installed in version-specific 
> directories as
> well. Unfortunately (and that applies to the development builds in the first
> place) it is often impossible to mix binaries and functions from different
> versions. Just think about added computil module :-) Currently it is hard to
> revert back to previous version (better said, I often want to keep several
> versions to test the difference. As it stands now, you cannot simply run old
> binary because functions are already changed).
> 

And a good example: after compiling/installing the fresh dev-14

/home/bor/.zshrc:9: failed to load module: zsh/complete
/home/bor/.zshrc:bindkey:19: no such keymap `menuselect'
compinit:475: failed to load module: zsh/complete
compinit:zstyle:475: autoload failed
compinit:476: command not found: zstyle
compinit:477: command not found: zstyle
compinit:478: command not found: zstyle
compinit:479: command not found: zstyle
compinit:480: command not found: zstyle
compinit:481: command not found: zstyle
compinit:483: command not found: zstyle
compinit:517: failed to load module: zsh/complete
compinit:zle:517: can't load complete module

And now I'd really like to start previous version again ...


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Version-dependent functions install path
  2000-01-06  7:04 Version-dependent functions install path Andrej Borsenkow
  2000-01-06  8:06 ` dev-14 problem - can't load zsh/complete " Andrej Borsenkow
@ 2000-01-06 10:50 ` Oliver Kiddle
  2000-01-06 20:20 ` Peter Stephenson
  2 siblings, 0 replies; 7+ messages in thread
From: Oliver Kiddle @ 2000-01-06 10:50 UTC (permalink / raw)
  To: ZSH workers mailing list

Andrej Borsenkow wrote:
> 
> I suggest, that functions are being installed in version-specific directories as
> well. Unfortunately (and that applies to the development builds in the first

I second this suggestion because I'm constantly having to rename my
functions directory. It happens quite often that a development version
doesn't work straight away and I have to revert.

I seem to remember that the function installation did some clever things
like checking if anyone had modified any of the supplied functions and
not overwriting those? I think we would be best to advise people making
local changes to the functions to copy them to their own directory
before editing them and then make sure that directory appears earlier in
the $fpath. 

Oliver Kiddle


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Version-dependent functions install path
  2000-01-06  7:04 Version-dependent functions install path Andrej Borsenkow
  2000-01-06  8:06 ` dev-14 problem - can't load zsh/complete " Andrej Borsenkow
  2000-01-06 10:50 ` Oliver Kiddle
@ 2000-01-06 20:20 ` Peter Stephenson
  2000-01-06 22:23   ` Tanaka Akira
  2 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2000-01-06 20:20 UTC (permalink / raw)
  To: ZSH workers mailing list

"Andrej Borsenkow" wrote:
> I suggest, that functions are being installed in version-specific directories
>  as
> well. Unfortunately (and that applies to the development builds in the first
> place) it is often impossible to mix binaries and functions from different
> versions.

Yes, it's a bit more difficult than it should be.  Furthermore, for most
users installing versions as well separated as 3.1.6 and 3.1.7 will be, the
position will be even worse, even if the pace of change of this area of the
code slows down in future.  So this adds the version.

I hope the choice of path (default
`/usr/local/share/zsh/functions/3.1.6-dev-14', mutatis mutandis) is
rational.  The version-specific bit comes last, as with the module path,
and the `share' remains present, despite the version-dependence, because it
refers to the absence of machine-dependence (it worried me at first, but
actually I've just noticed Emacs does exactly the same with its lisp code).
Indeed, this will make it easier to share functions across architectures
potentially running different versions of the shell.

Index: configure.in
===================================================================
--- configure.in	1999/12/21 15:18:27	1.11
+++ configure.in	2000/01/06 19:58:35
@@ -214,10 +214,10 @@
 AC_ARG_ENABLE(fndir,
 [  --enable-fndir=DIR         where functions go (default DATADIR/zsh/functions)],
 [if test $enableval = yes; then
-  fndir=${datadir}/${tzsh_name}/functions
+  fndir=${datadir}/${tzsh_name}/functions/${VERSION}
 else
   fndir="$enableval"
-fi], [fndir=${datadir}/${tzsh_name}/functions])
+fi], [fndir=${datadir}/${tzsh_name}/functions/${VERSION}])
 
 undefine([function_subdirs])
 AC_ARG_ENABLE(function-subdirs,
Index: INSTALL
===================================================================
--- INSTALL	1999/12/21 15:18:27	1.2
+++ INSTALL	2000/01/06 19:51:44
@@ -247,12 +247,15 @@
 By default, the shell functions which are installed with `make install' or
 `make install.fns' go into the directory ${datadir}/zsh/functions, which
 unless you have specified --datadir is the same as
-${prefix}/share/zsh/functions ($prefix itself defaults to /usr/local, as
-described below).  This directory will also be compiled into the shell as
-the default directory for the variable $fpath/$FPATH. You can override it
-with --enable-fndir=directory; --disable-fndir or --enable-fndir=no will
-turn off both installation of functions and the setting of a default value
-for $fpath/$FPATH.
+${prefix}/share/zsh/functions/$ZSH_VERSION ($prefix itself defaults to
+/usr/local, as described below).  This directory will also be compiled into
+the shell as the default directory for the variable $fpath/$FPATH. You can
+override it with --enable-fndir=directory; --disable-fndir or
+--enable-fndir=no will turn off both installation of functions and the
+setting of a default value for $fpath/$FPATH.  Note the presence of
+$ZSH_VERSION (e.g. `3.1.7') to avoid clashes between versions of zsh.
+If you only run one version of zsh at once, installing into a common
+directory such as /usr/local/share/zsh/functions is fine.
 
 You can control the functions which get installed by setting
 FUNCTIONS_INSTALL, either when running configure (e.g.
-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Version-dependent functions install path
  2000-01-06 20:20 ` Peter Stephenson
@ 2000-01-06 22:23   ` Tanaka Akira
  2000-01-07 22:26     ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Tanaka Akira @ 2000-01-06 22:23 UTC (permalink / raw)
  To: ZSH workers mailing list

In article <E126JN1-0003cR-00.2000-01-06-20-18-55@mail2.svr.pol.co.uk>,
  Peter Stephenson <pws@pwstephenson.fsnet.co.uk> writes:

> I hope the choice of path (default
> `/usr/local/share/zsh/functions/3.1.6-dev-14', mutatis mutandis) is
> rational.  The version-specific bit comes last, as with the module path,
> and the `share' remains present, despite the version-dependence, because it
> refers to the absence of machine-dependence (it worried me at first, but
> actually I've just noticed Emacs does exactly the same with its lisp code).
> Indeed, this will make it easier to share functions across architectures
> potentially running different versions of the shell.

I think DATADIR/zsh/VERSION/functions is better than
DATADIR/zsh/functions/VERSION because it enables us to collect version
specific stuff other than functions.  Also when a lazy administrater
install zsh-3.1.7 over zsh-3.1.6, a directory structure stays somewhat
clean.

Also, DATADIR/zsh/VERSION/site-functions and
DATADIR/zsh/site-functions should be exist for site specific
modifications and add-on packages.  Currently there is no add-on
packages, though.
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Version-dependent functions install path
  2000-01-06 22:23   ` Tanaka Akira
@ 2000-01-07 22:26     ` Peter Stephenson
  2000-01-09  2:58       ` Tanaka Akira
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2000-01-07 22:26 UTC (permalink / raw)
  To: ZSH workers mailing list

Tanaka Akira wrote:
> I think DATADIR/zsh/VERSION/functions is better than
> DATADIR/zsh/functions/VERSION because it enables us to collect version
> specific stuff other than functions.  

Actually, this is also just like Emacs.

> Also when a lazy administrater
> install zsh-3.1.7 over zsh-3.1.6, a directory structure stays somewhat
> clean.

I suppose you mean that the zsh-3.1.7 directory isn't buried among lots of
files or irrelevant subdirectories.

> Also, DATADIR/zsh/VERSION/site-functions and
> DATADIR/zsh/site-functions should be exist for site specific
> modifications and add-on packages.  Currently there is no add-on
> packages, though.

I wondered about this, but it's so easy to add in /etc/zshenv that I didn't
add it.  But maybe something will turn up that makes it more obviously useful.

Index: INSTALL
===================================================================
--- INSTALL	2000/01/07 19:42:02	1.3
+++ INSTALL	2000/01/07 19:42:34
@@ -247,7 +247,7 @@
 By default, the shell functions which are installed with `make install' or
 `make install.fns' go into the directory ${datadir}/zsh/functions, which
 unless you have specified --datadir is the same as
-${prefix}/share/zsh/functions/$ZSH_VERSION ($prefix itself defaults to
+${prefix}/share/zsh/$ZSH_VERSION/functions ($prefix itself defaults to
 /usr/local, as described below).  This directory will also be compiled into
 the shell as the default directory for the variable $fpath/$FPATH. You can
 override it with --enable-fndir=directory; --disable-fndir or
Index: configure.in
===================================================================
--- configure.in	2000/01/07 19:42:02	1.12
+++ configure.in	2000/01/07 19:42:24
@@ -214,10 +214,10 @@
 AC_ARG_ENABLE(fndir,
 [  --enable-fndir=DIR         where functions go (default DATADIR/zsh/functions)],
 [if test $enableval = yes; then
-  fndir=${datadir}/${tzsh_name}/functions/${VERSION}
+  fndir=${datadir}/${tzsh_name}/${VERSION}/functions
 else
   fndir="$enableval"
-fi], [fndir=${datadir}/${tzsh_name}/functions/${VERSION}])
+fi], [fndir=${datadir}/${tzsh_name}/${VERSION}/functions])
 
 undefine([function_subdirs])
 AC_ARG_ENABLE(function-subdirs,

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Version-dependent functions install path
  2000-01-07 22:26     ` Peter Stephenson
@ 2000-01-09  2:58       ` Tanaka Akira
  0 siblings, 0 replies; 7+ messages in thread
From: Tanaka Akira @ 2000-01-09  2:58 UTC (permalink / raw)
  To: ZSH workers mailing list

In article <E126hnm-0000Ph-00.2000-01-07-22-24-11@cmailg2.svr.pol.co.uk>,
  Peter Stephenson <pws@pwstephenson.fsnet.co.uk> writes:

> I suppose you mean that the zsh-3.1.7 directory isn't buried among lots of
> files or irrelevant subdirectories.

Yes.

> I wondered about this, but it's so easy to add in /etc/zshenv that I didn't
> add it.  But maybe something will turn up that makes it more obviously useful.

If /usr/local is shared by NFS or zsh is installed by non-root, it's
not so easy.  So I think site-functions should be included in fpath by
default.

DATADIR/zsh/zshenv (or site-start :) is another (general) way, though.
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-01-09  2:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06  7:04 Version-dependent functions install path Andrej Borsenkow
2000-01-06  8:06 ` dev-14 problem - can't load zsh/complete " Andrej Borsenkow
2000-01-06 10:50 ` Oliver Kiddle
2000-01-06 20:20 ` Peter Stephenson
2000-01-06 22:23   ` Tanaka Akira
2000-01-07 22:26     ` Peter Stephenson
2000-01-09  2:58       ` Tanaka Akira

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).