Subject: Re: Problem with the bulidlink.mk files in aalib and aalib-x11
To: Bernd Ernesti <netbsd@arresum.inka.de>
From: Johnny C. Lam <jlam@netbsd.org>
List: tech-pkg
Date: 03/04/2002 14:47:53
On Mon, Mar 04, 2002 at 10:48:25PM +0100, Bernd Ernesti wrote:
> On Mon, Mar 04, 2002 at 12:43:54PM -0800, Johnny C. Lam wrote:
> >
> > if something wants just aalib, will aalib-x11 also suffice?  If so, then
> > we can combine their buildlink.mk files and rewrite dependencies by
> > changing:
> > 
> > 	DEPENDS+=	aalib-[0-9]*:../../graphics/aalib
> > 
> > into:
> > 
> > 	DEPENDS+=	aalib{,-x11}-[0-9]*:../../graphics/aalib-x11
> 
> Hmm, and that will result in a problem with binary packages.
> 
> aalib and aalib-x11 install the same files, thats why the are conflicting.

The proposed dependency is how we currently deal with packages that use
either ghostscript or ghostscript-nox11.  The way it works is that it'll
use the first aalib package it finds, but if none is installed and no
binary package can be found, then it'll build aalib-x11.  The only time a
problem occurs is in the following scenario:

	A binary package that uses just aalib is pkg_add'ed and it finds
	no installed aalib package.  An existing binary package for aalib
	is then found which gets pkg_add'ed.  Later, a package that needs
	aalib-x11 is pkg_add'ed, but since it needs aalib-x11 and aalib-x11
	conflicts with aalib, the pkg_add fails.

> I can see why gphoto2 use aalib, there is no need for X11 support since
> gphoto2 has no x11 interface, if you want one you have to use gtkam.
> 
> But gtkam use the gphoto2 buildlink file and therefor only gets the
> aalib dependecy, and I don't know if thats enough for gtkam.
> I changed my local gphoto2 Makefile to use aalib-x11 instead of aalib
> to get it working for now on.
> 
> > Please file a PR on this problem, as I think there is definitely something
> > wrong with the aalib buildlink.mk files.
> 
> I do that tomorrow.

That would be great.  Please include the analysis you presented about in
the PR as well, as that's all very useful diagnostic information.

	Thanks!

	-- Johnny Lam <jlam@netbsd.org>