patch for 'select.sh'

Rainer Müller raimue at macports.org
Thu Jul 8 13:40:57 PDT 2010


On 2010-07-07 21:18 , Michael Dickens wrote:
> Here's a simple patch for 'select.sh' that adds in a check to make sure
> the target's directory exists -- and if not then creates it.  I've
> tested this patch locally and it works correctly, both when the target
> directory already exists and when it does not.  A similar check could be
> made on the 'rm' side to remove cleared directories, but that can come
> later.  I came upon this issue working on ticket #25459, and I think
> this is the correct solution and not to force keeping of directories
> from inside the Portfile.  I do not know who's in charge of this file,
> nor how to commit a patch to it beyond creating a patchfile. - MLD

Thanks for the patch!

Actually I would rather get rid of select.sh eventually as we copied
this functionality to port(1) itself already with 'port select'. Could
you please test if the same bug exists there?

The *_select command:
$ sudo foo_select baz
turns into:
$ sudo port select foo bar

But we cannot get rid of the *_select ports itself yet, as these provide
the base files which are required for the current implementation.

My proposal would be to replace *_select with a simple script calling
'port select' with appropriate arguments. This way current documentation
and behavior will be the same and do not need to be changed right now.
We could also add a deprecation warning to the *_select script, so users
are informed of the change.

Rainer


More information about the macports-dev mailing list