Binary packages and path: dependencies
Thibaut Paumard
mlotpot.news at free.fr
Wed Apr 11 06:03:37 PDT 2012
Hi,
I recently contributed a Portfile for yorick-av, a package which depends
on either ffmpeg or ffmpeg-devel. Ryan suggested to code this dependency
as path:lib/libavcodec.dylib:ffmpeg.
This works well as long as the package is built from source, but as I
understand it, it will lead to breakages with the autobuilt binary
packages because ffmpeg and ffmpeg-devel are not binary-compatible. If a
user first installs ffmpeg-devel, then yorick-av using the binary
package, yorick-av will install just fine but it will be completely
broken (which can, of course, be fixed with a forced source upgrade of
yorick-av... if the user is clever enough).
The alternative I can see is to not use a path: dependency in this case,
but to provide two explicit variants (one linking with ffmpeg, the other
with ffmpeg-devel). It would be great if the right variant could be
selected automatically depending on whether or not ffmpeg-devel is
already installed on the system, and I'm not sure how to do that.
Do you have an opinion on the matter of binary distribution of packages
with path dependencies that can be satisfied by several ABI-incompatible
packages?
That leads me also to a more generic question, which may be trivial for
you but I can't find the answer on the web: suppose package A depends on
package B. Both are autobuilt at a given point in time. Later, B is
upgraded with an incompatible ABI change. Will A be automatically
rebuilt? If a user has installed A and B, will the two packages always
be upgraded together so they are always in a working state?
Best regards, Thibaut.
More information about the macports-dev
mailing list