Subject: pkg/10087: Multiply found dependencies screw up pkgsrc
To: None <>
From: None <>
List: netbsd-bugs
Date: 05/09/2000 18:20:12
>Number:         10087
>Category:       pkg
>Synopsis:       Multiply found dependencies screw up pkgsrc
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 09 18:21:00 PDT 2000
>Release:        NetBSD-1.4.2, pkgsrc as of 9 May 2000
Redback Networks
System: NetBSD 1.4.2 NetBSD 1.4.2 (EQUITY) #5: Thu Mar 23 12:49:57 PST 2000 dogcow@admin:/build/nbsrc/1.4.2/syssrc/sys/arch/i386/compile/EQUITY i386

Some pkgsrc Makefiles have lines like this, taken from xv:

DEPENDS+=       ghostscript{,-nox11,-x11}-[0-9]*:../../print/ghostscript-x11

with ghostscript6, there are now /ghostscript/ _and_ /ghostscript-x11/
packages; because both of these are found, the error 
===> Validating dependencies for xv-3.10apl1
Installed package ghostscript{,-nox11,-x11}-[0-9]* is an a.out
a.out package.
You are building an a.out package, which will not inter-operate.
Please update the ghostscript{,-nox11,-x11}-[0-9]* package to a.out
*** Error code 1

will occur
install pkgsrc ghostscript6, and attempt to install a program that
requires ghostscript in the manner described above.
For a workaround, you can simply delete the initial comma in the depends:

DEPENDS+=       ghostscript{-nox11,-x11}-[0-9]*:../../print/ghostscript-x11

However, it would probably be desirable to fix this problem in the
pkgsrc makefiles to properly handle multiply-found dependencies per line.
(and/or have a 'pkgsrc lint' program.)