Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 May 2005 20:44:51 +0200
From:      Michael Nottebrock <lofi@freebsd.org>
To:        freebsd-ports@freebsd.org
Cc:        "James E. Flemer" <jflemer@uvm.edu>
Subject:   Re: Why are implicit package dependencies recorded?
Message-ID:  <200505082044.52084.lofi@freebsd.org>
In-Reply-To: <427E4687.40901@uvm.edu>
References:  <427E4687.40901@uvm.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1519824.U6JW9oHTiN
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Sunday, 8. May 2005 19:04, James E. Flemer wrote:

> I ask mostly because it seems to easy to get the
> sub-dependencies wrong.  A simple case for incorrect sub-deps is this:
>
> There is a package P that depends on a package D.  The package D has an
> optional dependency on S via the make flag WITH_S.  The dependency on S
> defaults to false.  If package D is built with -DWITH_S, then D depends
> on S.  Now, when package P is built the package-depends-list target will
> recurse into D, but omits S from the list (remember the flag defaults to
> false).
>
> The scenario above creates a hidden dependency in P on S (that is not
> recorded in the @pkgdep list).  If the case above is inverted, WITH_S
> defaults to true and D is built with -DWITHOUT_S, then a bogus
> dependency on S is recorded for P.

Dependencies are recorded as they are flagged. If there's an .ifdef=20
WITH/WITHOUT_S wrapper around a *_DEPENDS line in a Makefile, the dependenc=
y=20
will or will not be recorded into the binary package correctly, so it's=20
perfectly possible to build customized packages with different dependencies=
=20
than the default ones (I guess that's what you want to do).

> Both of these cases can be avoided by building P with the same flags
> that D was built with.  In the simple case, that does not seem like a
> bad solution, but in practice there can be a huge number of deps and
> sub-deps (mplayer has around 45).
>
> Is there a need for sub-deps to be recorded recursively?  I believe that
> pkg_add will do the right thing if they are not.

I'm quite sure it won't. Have you tried?

=2D-=20
   ,_,   | Michael Nottebrock               | lofi@freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org

--nextPart1519824.U6JW9oHTiN
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQBCfl4kXhc68WspdLARAvbbAJ0TRPnx/Wd2fyq8iJTDiV47csqfiACdG7u8
iJHTY3qVVakqwdNoA/60JDY=
=Ut+4
-----END PGP SIGNATURE-----

--nextPart1519824.U6JW9oHTiN--



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