Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Aug 2009 15:52:03 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: ports/*/jpeg "Thanks a lot guys"
Message-ID:  <4A75A813.10307@infracaninophile.co.uk>
In-Reply-To: <4A7552C8.7020508@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>	<20090801224323.GA65040@server.vk2pj.dyndns.org> <4A7552C8.7020508@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC0F236BE26245D3A06819A5B
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Matthew Seaman wrote:

> Peter Jeremy wrote:=20
>> 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 ; d=
one | \
>>   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 t=
he
>>    port than installs it.
>> 2) You are relying on LIB_DEPENDS being correct:  In my general exampl=
e
>>    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) of=
f
>> the top of my head.

> Doing (1) using my p5-FreeBSD-Portindex code is pretty easy.  It's abou=
t
> time I released an update anyhow -- I'll code up a little app that=20
> processes
> the LIB_DEPENDS linkages already stored in the cache and lists each por=
t
> that has a LIB_DEPENDS, together with all the ports it depends on=20
> cumulatively.

I've got this working now -- I still need to do some more testing, update=

documentation and stuff before I release version 2.2 of p5-FreeBSD-Portin=
dex,
but as a taster, here's the result of generating this on my machine just =
now:

   http://www.infracaninophile.co.uk/SHLIBS.bz2

(Note that this includes the effect of a number of local settings in
/etc/make.conf)

It's similar to the ports INDEX file, when decompressed.  There's one row=
 of
the file for each port, and each row contains 3 fields separated by '|'=20
characters:

   package-name|port/origin|space separated list of lib_depends port orig=
ins

So, to extract the list of ports depending on www/jpeg:

happy-idiot-talk:/tmp:% grep graphics/jpeg SHLIBS | cut -d '|' -f 1-2 | h=
ead -10
accerciser-1.6.1_1|/usr/ports/accessibility/accerciser
at-poke-0.2.3_4|/usr/ports/accessibility/at-poke
at-spi-1.26.0_1|/usr/ports/accessibility/at-spi
dasher-4.10.1_1,2|/usr/ports/accessibility/dasher
gnome-mag-0.15.8|/usr/ports/accessibility/gnome-mag
gnopernicus-1.1.2_6|/usr/ports/accessibility/gnopernicus
gok-2.26.0_1,1|/usr/ports/accessibility/gok
kdeaccessibility-3.5.10_2|/usr/ports/accessibility/kdeaccessibility
kdeaccessibility-4.2.4_1|/usr/ports/accessibility/kdeaccessibility4
mousetweaks-2.26.3_1|/usr/ports/accessibility/mousetweaks

Again, this has a number of deficiencies.  For instance, programs that
embed a perl interpreter will link against libperl.so =3D> /usr/local/lib=
/perl5/5.10.0/mach/CORE/libperl.so, but none of them register
a LIB_DEPENDS on lang/perl5.10. [See for example net-mgmt/net-snmpd,
www/mod_perl2]

Similarly, programs that declare 'USE_MYSQL=3DNN' will have a LIB_DEPENDS=
=20
on libmysqlclient.so.X added to their dependency mix even if they contain=

no compiled ELF binaries [See net-mgmt/cacti databases/phpmyadmin]

However, I think that the deficiencies are not too intractable to fix,
and this approach shows some promise.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW


--------------enigC0F236BE26245D3A06819A5B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkp1qBkACgkQ8Mjk52CukIxQ7gCdE39yFLHP98nvARdabd//LQJK
QUUAnRoKhp2JY8lEHfJ0yExnlYMaD7HF
=YQ15
-----END PGP SIGNATURE-----

--------------enigC0F236BE26245D3A06819A5B--



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