Open probonopd opened 3 years ago
The launch
command is supposed to give users helpful information in case an application cannot be launched. (in a future version, we may want to not only give advice but also offer to do it.)
Exmaple: https://www.cinelerra-gg.org/freebsd-package/
It would be neat if we could offer a way for the user to find out which FreeBSD package to install.
tells us: graphics/openexr
! (Note that we need to use libIlmImf
minus any version numbers or else we don't get any search result.)
...almost.
% find /usr/local/lib/ | grep libIlmImf
/usr/local/lib/libIlmImfUtil-2_5.so.25
/usr/local/lib/libIlmImf-2_5.so
/usr/local/lib/libIlmImf-2_5.so.25
Turns out that sudo pkg install graphics/openexr
installs 25 whereas we need 24.
So we really need a way to search for the full file name, not "minus any version numbers". Ideally across all still-available package branches (maybe we would find 24 in some earlier one?).
Is there a way to do this @dlangille?
(Also, is it a bug that this query returns HTML rather than plaintext?)
We might even want to run dd
proactively to find all missing libraries at once:
% ldd ~/Desktop/Cinelerra\ GG.app/Resources/cin | grep not
libIlmImf-2_3.so.24 => not found (0)
libIlmThread-2_3.so.24 => not found (0)
libIex-2_3.so.24 => not found (0)
libaom.so.0 => not found (0)
libdav1d.so.3 => not found (0)
libx264.so.157 => not found (0)
libx265.so.176 => not found (0)
https://github.com/helloSystem/launch/issues/1#issuecomment-798869996
Also, for example:
% pkg provides libilmimf
Name : openexr-2.5.5
Desc : High dynamic-range (HDR) image file format
Repo : FreeBSD
Filename: usr/local/lib/libIlmImfUtil.so
usr/local/lib/libIlmImfUtil-2_5.so.25.0.4
usr/local/lib/libIlmImfUtil-2_5.so.25
usr/local/lib/libIlmImfUtil-2_5.so
usr/local/lib/libIlmImf.so
usr/local/lib/libIlmImf-2_5.so.25.0.4
usr/local/lib/libIlmImf-2_5.so.25
usr/local/lib/libIlmImf-2_5.so
Name : ampasCTL-1.5.2_11
Desc : Color Transformation Language interpreter
Repo : FreeBSD
Filename: usr/local/lib/libIlmImfCtl.so
%
pkg provides
Does this work with packages that are not installed as well?
Wow!
Sounds like what we need. (At least if it keeps track of release_0
, release_1
, release_2
, quarterly
, latest
and so on packages for each major release of FreeBSD.)
Related: https://github.com/FreshPorts/freshports/issues/219#issuecomment-799616386
Define further error handlers, e.g., for
sudo pkg install ...
but we should actually offer to do itImplemented so far: