Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#14615 closed defect (fixed)

select.sh tools (python_select, gcc_select) should remember selected versions across upgrade

Reported by: macports_dharland@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: raimue (Rainer Müller), macports_dharland@…, mww@…, blb@…
Port:

Description

Suppose that a user has installed python_select and used as follows

python_select python24

Currently, an upgrade to python_select will result in the users setting being forgotten. In fact since the post-destroot for python_select explicitly chooses python23-apple, /opt/local/bin/python will now point to a different executable/version than before the upgrade.

This isn't great and can cause python programs to crash for reasons that aren't that obvious to the user.

A suggested solution is for $TOOL_select to also write a symlink pointing to the selected option such as

/opt/local/etc/selected/python->/opt/local/etc/select/python/python24

Then upon activation $TOOL_select can be run passing the users previously selected version.

In addition a -s option could be provided to $TOOL_select to report the currently selected version.

Attachments (1)

select.diff (1.7 KB) - added by blb@… 16 years ago.
diff to select/select.sh

Download all attachments as: .zip

Change History (5)

comment:1 Changed 16 years ago by blb@…

Cc: blb@… added

Attaching a patch which should accomplish this (remember which is selected, offer a switch to show what it is). Once done, the *_select ports will need to be updated to check for the existence of .current and if found, not run the select in the post-destroot phase.

Changed 16 years ago by blb@…

Attachment: select.diff added

diff to select/select.sh

comment:2 Changed 16 years ago by raimue (Rainer Müller)

Committed the patch in r40609.

comment:3 Changed 16 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Released select 0.2 in r44661.

comment:4 Changed 16 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

Note: See TracTickets for help on using tickets.