Page MenuHomeFreeBSD

Install/remove qtchooser wrappers on pkg-install/uninstall
ClosedPublic

Authored by tcberner on Jan 1 2020, 5:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 8:52 PM
Unknown Object (File)
Oct 18 2024, 11:07 AM
Unknown Object (File)
Oct 4 2024, 10:12 PM
Unknown Object (File)
Oct 3 2024, 2:18 AM
Unknown Object (File)
Sep 26 2024, 6:42 AM
Unknown Object (File)
Sep 25 2024, 3:08 AM
Unknown Object (File)
Sep 8 2024, 12:55 AM
Unknown Object (File)
Sep 5 2024, 5:10 PM
Subscribers

Details

Summary

misc/qtchooser provides a wrapper binary bin/qtchooser, that when called with
name foo, will lauch the corresponding binary from
lib/qt${current_qt_version}/bin/foo.

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

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 28443
Build 26512: arc lint + arc unit

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
done
Creating qtchooser links
    /usr/local/bin/qmake
done
===========================================================================
=>> 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.
misc/qtchooser/files/update-qtchooser-wrapper.in
33

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 qt-dist.mk 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.