Subject: Re: should maybe be installed with libraries?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <>
List: tech-pkg
Date: 11/25/2001 18:52:18
[ On Friday, November 23, 2001 at 16:45:04 (-0800), Johnny Lam wrote: ]
> Subject: Re: should maybe be installed with libraries?
> On Fri, Nov 23, 2001 at 02:03:33PM -0500, Greg A. Woods wrote:
> > [ On Friday, November 23, 2001 at 16:13:52 (+0100), Olaf Seibert wrote: ]
> > > Subject: should maybe be installed with libraries?
> > >
> > > I see a potential for version skew with the current system.
> > > 
> > > If you build a program P which depends on installed library L, then
> > > L/ is used.
> > > 
> > > But this version of L/ is the version for the most recent
> > > version in pkgsrc. Program P may not require the most recent version but
> > > may be happy with an older version that was installed earlier.
> This is not true.  The file may easily specify files from old
> versions of a package in BUILDLINK_FILES.<pkg>.  See gtk/

That's not the problem.  You're ignoring what happens when someone
follows pkgsrc-current (something far more common, in my estimation at
least, than people following netbsd-current itself).

> This is also why the dependency pattern in a isn't set to the
> most recent package.

That's irrelevant.  I understand "most recent version" in the above to
mean "most recent version required by L/", just as the
preceding sentence seems to try to show.  That's certainly where it's
tripped me up in any case.

A prefect example of a G.D. library with far too many interdependencies
in pkgsrc is the most aptly named graphics/gd.  In revision 1.4 of it's file the setting is: gd>=1.8.3
However if this is changed at any time then every package that directly
or indirectly uses will have to be deleted and re-built after
the new graphics/gd has been built and installed before any other
previously uninstalled package that directly or indirectly uses
can be built and installed, regardless of whether or not it really needs
the newer version.  In the case of graphics/gd the ripple effect with
further dependencies can be far and wide.  This is unecessarily
disruptive.  Users of pkgsrc-current should not be required to
'pkg_delete *' every time they update, especially when there's no real
hard reason to do so.

> > This isn't just a potential problem -- it's very real.  I've tripped
> > over it several times already myself!
> Use send-pr to report these problems so that we may become aware of them
> and fix them.  I certainly haven't heard these problems.

If I have time I will -- but in this case the logic should be easy
enough to follow without a concrete example.  It's a design issue, not a
per-package instance bug, after all.

> > > In this case, the L/ does not belong to the installed
> > > version of L. To make sure that this can never be a problem, we must
> > > install L/ with L, so that when linking with L the
> > > from that time is used.
> > 
> > Yes, I believe this is the correct solution, but with one possible
> > caveat:  I think The overloading of (BUILD_)DEPENDS with a default
> > in the files needs to be removed.
> No.  You may simply list the files from previous versions in the

No, you've missed the problem entirely I think....

The files really _must_ be installed with the package that
supplies them, and other packages really _must_ use the installed file, if the (BUILD_) settings are to remain in
those files.  The ">" relation really isn't appropriate in there either.

Even without the (BUILD_) settings I believe it's still
better to install that files as part of the product.  They
are after all used as part of the product, not as part of pkgsrc per se
(and especially not as part of the source package they belong to).  This
should simplify their maintenance tremendously too since now they are
specific to a given package version and no backwards compatabilty need
be maintained.  Never make something more complicated than it needs to

The final clincher is that installing the files as part of
the product would be one of the necessary pre-requisites to making it
possible to build part of pkgsrc, or even just one pkgsrc module, in
isolation (i.e. without having to have all of pkgsrc unpacked and
available in the same hierarchy).  This is something I've desired right
from the very beginning, and except for files, the rest of
pkgsrc has slowly been getting more capable of accomodating such a

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>     <>
Planix, Inc. <>;   Secrets of the Weird <>