patch for 'select.sh'

Michael Dickens michaelld at macports.org
Thu Jul 8 13:55:16 PDT 2010


On Thu, 08 Jul 2010 22:40 +0200, "Rainer Müller" <raimue at macports.org>
wrote:
> 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

Yes, the bug is there too; in a different form:

% sudo qt4_select none
% pushd /opt/local/Library
% sudo mv Frameworks tmp
% sudo port select qt4 qt4-mac
Selecting 'qt4-mac' for 'qt4' failed: could not create new link
"/opt/local/Library/Frameworks/Qt3Support.framework" since target
"/opt/local/libexec/qt4-mac/lib/Qt3Support.framework" doesn't exist

% ls -lFd /opt/local/libexec/qt4-mac/lib/Qt3Support.framework
drwxr-xr-x  4 root  admin  306 Jul  7 11:00
/opt/local/libexec/qt4-mac/lib/Qt3Support.framework/

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

Yeah; that's an issue: how to get the 'base' in place.  Seems natural to
have it installed via a "FOO_select" port as it is right now: it's only
installed if needed and other wise does not add clutter.

> 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.

If we leave the "FOO_select" port, but change it so that it's a simple
script as you say above (just calls 'port' etc), -and- also leave the
'base' file with this port, then that takes care of a few issues at the
same time.

> We could also add a deprecation warning to the *_select script, so users
> are informed of the change.

Yes, but maybe save that as a change for once the 'base' file is
installed somewhere else.  We can't get rid of the FOO_select ports
until the 'base' is installed from somewhere else. - MLD


More information about the macports-dev mailing list