[uw.mfcf.people] where to place commands that straddle two packages

lindsay@watnext.waterloo.edu (Lindsay Patten) (09/28/89)

From: Lindsay Patten <lindsay>

What is the proper place to put a command that is part of/depends on
two packages.  We have a command called imxv that is an imtool but
is used to display under X10.  We now have an X11 version.

Should we
	1) have two commands in the im package (requires new different names)
	2) have a seperate package (large hassle)
	3) put a command in each of the x packages (ask to...)
	4) something else

Thanks,
	Lindsay
--
Lindsay Patten            "People are package deals - No substitutions allowed"
Pattern Analysis & Machine Intelligence Group                   lindsay@watnext
Department of Systems Design Engineering           lindsay@watnext.waterloo.edu
University of Waterloo              {utai|decvax|uunet}!watmath!watnext!lindsay

jmsellens@watdragon.waterloo.edu (John M. Sellens) (09/28/89)

In article <11657@watcgl.waterloo.edu> lindsay@watnext.waterloo.edu writes:
>From: Lindsay Patten <lindsay>
>
>What is the proper place to put a command that is part of/depends on
>two packages.  We have a command called imxv that is an imtool but
>is used to display under X10.  We now have an X11 version.
>
>Should we
>	1) have two commands in the im package (requires new different names)
>	2) have a seperate package (large hassle)
>	3) put a command in each of the x packages (ask to...)
>	4) something else

imxv is not part of either x10 or x11 so it must be part of some PAMI
originated package.  You could have a separte package for each called
something like x10,imxv and x11,imxv - but that's kind of annoying.
You could have 3 commands in your pami package - imxv.x10 imxv.x11 and
imxv.  imxv is a shell script that does something like:

#!/bin/sh
# warning this won't work exactly, but you get the idea

switch `showpath findfirst=xterm`
   *11*) exec imxv.x11 args
	;;
   *10*) exec imxv.x10 args
	;;
    *) echo I don't know what kind of X you want
.....

ksbooth@watcgl.waterloo.edu (Kelly Booth) (09/28/89)

In article <16745@watdragon.waterloo.edu> jmsellens@watdragon.waterloo.edu (John M. Sellens) writes:
>imxv is not part of either x10 or x11 so it must be part of some PAMI
>originated package.

It is part of the CGL IM package.  The point of the question was (to
paraphrase):

	imxv is a tool that the user should be able to use independent
	of the version of X on the particular workstation (because it
	really doesn't work any different under X10 or X11 in terms of
	what the user sees).  So how should it be named?

This is analogous to "cp", which is always called cp on every Unix
systems, but is implemented (I presume) differently on different
versions of Unix.  The big difference with X is that the version you
need depends not on the cpu on which the client is running, but on the
workstation on which the server resides.  This means that each cpu that
has clients must support both X10 and X11 versions of such tools in
the current Waterloo environment.

The only suggestion I can think of is to build imxv10 and imxv11, and
then write imxv to be a shell script (or something) that attempts to
figure out which version you really want to run based on the target
server) and then executes that version for you.  This would make the
naming similar to all other IM tools while still maintaining
compatibility with both X10 and X11.