Automatic dependency adding in 1.2.x ?

Baptiste Daroussin bapt at FreeBSD.org
Tue Dec 10 19:15:12 UTC 2013


On Tue, Dec 10, 2013 at 07:25:43PM +0100, Pawel Pekala wrote:
> Hi,
> 
>  During my last work on ports linking problems I noticed one thing with
> new 1.2.x (?) pkg. It's seems now pkg adds dependencies not listed in
> LIB_DEPENDS when package links to some lib on live system. So for
> example it links dynamically to databases/tinycdb when available on
> system and this is not recorded in port's Makefile (tinycdb is not
> pulled but any other deps also).
> 
>  From user's point this is desirable behaviour, it keeps things sane -
> tinycdb can't be removed when there are other packages that link to it's
> libraries and prevents breakage.
> 
>  On the developer's side of things this is at least strange choice - it
> hides problems instead trying to expose them and get them fixed. It
> makes finding those kind of errors a lot harder in my view and leads to
> official packages (built in sterile environment) lacking some features
> or being even broken in rare cases.
> 
> Is there are any way to disable this feature? 
> 
> Maybe related to this,ffmpeg0 on my system thinks it depends on
> ffmpeg now:
> 
> [corn:~]> pkg info -d ffmpeg0-0.7.16_1,1 
> ffmpeg0-0.7.16_1,1:
>         freetype2-2.5.0.1
>         xvid-1.3.2,1
>         x264-0.136.2358_1
>         schroedinger-1.0.11_1
>         libvpx-1.2.0
>         libtheora-1.1.1_3
>         gpac-libgpac-0.5.0,1
>         ffmpeg-2.1.1_1,1
>         png-1.5.17
>         opencv-core-2.4.7
>         jpeg-8_4
>         sdl-1.2.15_2,2
>         orc-0.4.18
>         libvorbis-1.3.3_1,3
>         libogg-1.3.1,4
>         jackit-0.121.3_3
> 

That is desired and there is no way to disable this feature, this is done by
introspecting the binaries to figure out the libraries they do need,
DEBUG_LEVEL=1 should show you the dependencies automatically added.

The point is then to totally disable the recursive dependencies we have now and
in long term to not make any difference between lib dependencies and build
dependencies.

There is no magic behind that and that changes nothing for the developper, the
dependencies are added because they are needed for example if glib brings icu
and your program only uses glib the developper has no way to figure out that
depending on glib option he may or may not add icu in the list of the
dependencies.

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20131210/f878cc05/attachment.sig>


More information about the freebsd-pkg mailing list