Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Aug 2001 23:52:24 +0200
From:      Anton Berezin <tobez@tobez.org>
To:        John Merryweather Cooper <jmcoopr@webmail.bmi.net>
Cc:        FreeBSD-PORTS <freebsd-ports@FreeBSD.ORG>
Subject:   Re: How to tell when BUILD vs. RUN_DEPENDS is appropriate/more appropriate
Message-ID:  <20010803235224.A17409@heechee.tobez.org>
In-Reply-To: <20010731094840.A3340@johncoop>; from jmcoopr@webmail.bmi.net on Tue, Jul 31, 2001 at 09:48:40AM -0700
References:  <20010730201214.O82760@johncoop> <20010731093220.A16762@heechee.tobez.org> <20010731094840.A3340@johncoop>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 31, 2001 at 09:48:40AM -0700, John Merryweather Cooper wrote:
> On 2001.07.31 00:32 Anton Berezin wrote:
> > On Mon, Jul 30, 2001 at 08:12:14PM -0700, John Merryweather Cooper wrote:

> > > Now, LIB_DEPENDS is (usually) pretty easy--if a port needs a
> > > library that's not already on the system, one is really going to
> > > know it when the linker fails.  But differentiating between a
> > > BUILD_DEPENDS and a RUN_DEPENDS seems to be a much grayer area.
> > > How to resolve this such that not only does a port build
> > > correctly, but bento doesn't also complain about what appears to
> > > be the entire tree for python or perl not being in the pkg-plist.

> > I am not sure I follow you here.  Perl is in the base system, is not
> > it?

> Well, take a look at the build logs on bento for dhcpconf--I see
> nearly the entire directory structure for python1.5 and perl5 being
> listed as missing for the pkg-plist for the port.  I'm trying to
> understand this, with an aim to:  1) fix it if I can; 2) prevent it
> from happening on anything I'm responsible for.

Okay, I looked.  :-)

	list of extra files and directories in /usr/local
	lib/python1.5 extra
	list of all files and directories in /usr/local
	....
	tons of stuff
	....

This does not say that everything in /usr/local is in error.  It says
that there is an extra file or directory (in this case, a directory)
/usr/local/lib/python1.5.  All the rest is only for your `convenience',
partially induced by the limitations of mtree(8), namely, by the fact
that it does not descend into `extra' directories.

Basically, you are supposed to skip all the normal good stuff from
mtree-generated /usr/local/* and look directly at the contents of
/usr/local/lib/python1.5, which is printed somewhere in the middle of
our 1000+ lines of text.  :-)  Well, that's how I see it, at least - the
buildscript can't be harmed by certain improvement here.  :-)

Anyway.

The culprit is the devel/newt port, which had the following pkg-plist:

	bin/whiptail
	lib/python1.5/lib-dynload/_snackmodule.so
	lib/python1.5/snack.py
	lib/whiptcl.so
	lib/libnewt.a
	lib/libnewt.so
	lib/libnewt.so.%%VERSION%%
	include/newt.h

It should really be

	bin/whiptail
	lib/python1.5/lib-dynload/_snackmodule.so
	lib/python1.5/snack.py
	lib/whiptcl.so
	lib/libnewt.a
	lib/libnewt.so
	lib/libnewt.so.%%VERSION%%
	include/newt.h
	@unexec rmdir %D/lib/python1.5/lib-dynload 2>/dev/null || true
	@unexec rmdir %D/lib/python1.5 2>/dev/null || true

When the buildscript *installs* dhcpconf, it installs all *packages*
which dhcpconf requires, recursively.  The problem with the newt port is
that for some reason python is listed as *BUILD*_DEPENDS for it, and
therefore is not required because newt is installed from a *package*.

The error is not triggered during the automated build of newt itself,
since this time python package is in the dependencies.  When newt
package has been built, it is deleted first, then all the packages it
depends on are deleted, including python, and since newt correctly
uninstalls all its *files*, python package can be deleted successfully,
removing these lyb/python and lib/python/lib-dynload directories.

Ufff.

The moral is:  beware of BUILD_DEPENDS.  No.  The real moral is:  it is
trickier than one might think...   :-)

Cheers,
\Anton.
-- 
May the tuna salad be with you.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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