Page MenuHomeFreeBSD

Install/remove qtchooser wrappers on pkg-install/uninstall

Authored by tcberner on Jan 1 2020, 5:26 PM.



misc/qtchooser provides a wrapper binary bin/qtchooser, that when called with
name foo, will lauch the corresponding binary from

Previously qtchooser would install a list of 30-ish symlinks to itself automatically.
Now we switch this around.

qt-dist ports that define QT_BINARIES will now have a @postexec and @postunexec
entry added to their plist to run the shell-script update-qtchooser-wrapper
(installed by qtchooser).

update-qtchooser-wrapper removes all symlinks to bin/qtchooser that have no
corresponding binary in lib/qt*/bin, and readds links that are missing.

PR: 242905

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

===>  Installing for qt5-qmake-5.14.0
===>  Checking if qt5-qmake is already installed
===>   Registering installation for qt5-qmake-5.14.0
[130amd64-kde-qt-job-01] Installing qt5-qmake-5.14.0...
Removing qtchooser links
Creating qtchooser links
=>> Checking for extra files and directories
=>> Cleaning up wrkdir
===>  Cleaning for qt5-qmake-5.14.0

Use exit rather than return.

Do we really need those echos in the script? AFAIK, java/javavmwrapper does basically the same thing, but do it silently.

Do we really need those echos in the script? AFAIK, java/javavmwrapper does basically the same thing, but do it silently.

I think when a script modifies the system on pkg-add/pkg-remove it should say what it does.

Something for the documentation comment at the top:

# If a port installs Qt version-specific binaries (e.g. "designer" which existed as a Qt4 application
# and exists as a Qt5 application and will probably be a Qt6 application) which should have a
# qtchooser-based wrapper, the port should set `QT_BINARIES=yes`.
# When QT_BINARIES is set to yes, compatibility symlinks (designer -> qtchooser, so that
# qtchooser can run  designer-qt5 or whatever is the selected Qt version) are installed by the port.
32 ↗(On Diff #66216)

Should be break, and a comment like # If at least one versioned executable is found for this name, keep the qtchooser compatibility symlink for this name; otherwise, remove it.

(I think that documentation comment should also be in though)

This revision was not accepted when it landed; it landed in state Needs Review.Jan 25 2020, 8:19 PM
This revision was automatically updated to reflect the committed changes.