Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2009 08:43:23 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: ports/*/jpeg "Thanks a lot guys"
Message-ID:  <20090801224323.GA65040@server.vk2pj.dyndns.org>
In-Reply-To: <4A747C77.1040800@infracaninophile.co.uk>
References:  <20090731173636.GA76357@owl.midgard.homeip.net> <20090731121249.538ea7e7.jasonh@DataIX.net> <20090731173636.GA76357@owl.midgard.homeip.net> <4A740679.1020608@infracaninophile.co.uk> <c/bsZ0e9iU@dmeyer.dinoex.sub.org> <4A747C77.1040800@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

[I was also dismayed when I saw the bump].

On 2009-Aug-01 18:33:43 +0100, Matthew Seaman <m.seaman@infracaninophile.co=
=2Euk> wrote:
>You could, for instance, run ldd(1) against each of the files a port insta=
lls
>and then record in /var/db/pkg/portname-1.2.3/+SHLIBS or equivalently in t=
he
>.tbz package tarball a sorted and uniq'd list of all the shared libraries
>linked against.

Unfortunately, this isn't sufficient because a non-trivial number of
ports dlopen() libraries rather than directly linking against them.
(The Xorg server is probably the most widely used culprit here).

>  Or you could resolve the shlib filenames back to the ports
>that supply them, and create a 'SHLIB_PORTS_NEEDED' variable in the port
>Makefiles.

A third approach is to more carefully recurse through the dependency
tree: Given A depends on B depends on C, B only needs bumping if it
LIB_DEPENDS on A and C only needs bumping if it LIB_DEPENDS on B and
B was bumped.

In this specific case, p5-RT-* depends on www/rt38 depends on
graphics/p5-GD depends on graphics/gd depends on graphics/jpeg.  When
jpeg is bumped, gd needs to be bumped because it LIB_DEPENDS on jpeg.
p5-GD then needs to be bumped because it LIB_DEPENDS on gd.  rt38 does
not need to be bumped because it has no LIB_DEPENDS on p5-GD.  p5-RT-*
does not need to be bumped because rt38 is not bumped.

This is slighly more complex than
  cd /usr/ports && \
  for i in */*; do [ -d "$i" ] && cd "$i" && make all-depends-list ; done |=
 \
  grep jpeg
because you need to actually follow the dependency tree, but is not
impractical.  The only issues I can see with this approach are:
1) Mapping the shared library reported by 'make lib-depends' back to the
   port than installs it.
2) You are relying on LIB_DEPENDS being correct:  In my general example
   above, if A is missing a LIB_DEPENDS on C, this may not be detected
   in the build process because of the implicit dependency on C via B.

No sample script because I'm not sure of the correct approach to 1) off
the top of my head.

--=20
Peter Jeremy

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkp0xQsACgkQ/opHv/APuIfRvgCffa+wrSmYUIUpIJ6arISGDDDE
OvoAnRaJjnvHeoetpYN8MeNTlxxRwx2h
=g8k2
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090801224323.GA65040>