svn commit: r305338 - in head/games/pycadia: . files

Jason Helfman jgh at FreeBSD.org
Sun Oct 7 00:19:11 UTC 2012


On Sat, Oct 6, 2012 at 3:40 PM, Doug Barton <dougb at freebsd.org> wrote:

> On 10/06/2012 15:34, Jason Helfman wrote:
> > On Sat, Oct 6, 2012 at 3:30 PM, Doug Barton <dougb at freebsd.org
> > <mailto:dougb at freebsd.org>> wrote:
> >
> >     On 10/06/2012 15:25, Jason Helfman wrote:
> >     > On Sat, Oct 6, 2012 at 2:20 PM, Doug Barton <dougb at freebsd.org
> >     <mailto:dougb at freebsd.org>
> >     > <mailto:dougb at freebsd.org <mailto:dougb at freebsd.org>>> wrote:
> >     >
> >     >     On 10/05/2012 22:37, Jason Helfman wrote:
> >     >     > Added: head/games/pycadia/files/pycadia.sh.in
> >     <http://pycadia.sh.in> <http://pycadia.sh.in>
> >     >     >
> >     >
> >
> ==============================================================================
> >     >     > --- /dev/null 00:00:00 1970   (empty, because file is newly
> >     added)
> >     >     > +++ head/games/pycadia/files/pycadia.sh.in
> >     <http://pycadia.sh.in> <http://pycadia.sh.in>
> >     >        Sat Oct  6 05:37:29 2012        (r305338)
> >     >     > @@ -0,0 +1,6 @@
> >     >     > +#!/bin/sh
> >     >     > +#
> >     >     > +# $FreeBSD$
> >     >     > +
> >     >     > +cd "%%DATADIR%%"
> >     >     > +./pycadia.py
> >     >
> >     >     Unless there is some reason to cd into that directory, you'd
> >     be better
> >     >     off with just: %%DATADIR%%/pycadia.py
> >     >
> >     >     And in any case, shouldn't you be using exec here?
> >     >
> >     >
> >     > I can check with the maintainer, but it does need to be run from
> the
> >     > DATADIR specifically.
> >
> >     Ok, that's not a problem. A comment to that effect would probably be
> >     useful for future reference.
> >
> >
> >     > What would exec provide that isn't currently fulfilled?
> >
> >     Eliminating the shell.
> >
> > Fair enough. I can discuss with maintainer, as he has many ports that do
> > this. I would suggest using %%PYTHON_CMD%% in favor of exec. Do you see
> > an issue with that?
>
> Yes, unless %%PYTHON_CMD%% has some magic to eliminate the shell that
> I'm not aware of. :)
>
> Try the existing command with and without exec and then look at your ps
> output to see my point.
>
> Doug
>

Currently I'm not aware of a method to eliminate the shell within a shell
script. Had I realized this was such an issue I would've sent mail
requesting a review.

%%PYTHON_CMD%% become /usr/local/bin/pythonXX

-jgh

--
Jason Helfman          | FreeBSD Committer
jgh at FreeBSD.org     | http://people.freebsd.org/~jgh  | The Power to Serve



More information about the svn-ports-all mailing list