Subject: pkg/26464: pkgsrc/Packages.txt does not explain how to do 'OR' dependencies
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gdt@ir.bbn.com>
List: pkgsrc-bugs
Date: 07/28/2004 10:20:21
>Number:         26464
>Category:       pkg
>Synopsis:       pkgsrc/Packages.txt does not explain how to do 'OR' dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 28 14:21:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Greg Troxel
>Release:        NetBSD 1.6.2_STABLE
>Organization:
        Greg Troxel <gdt@ir.bbn.com>
>Environment:
	
	
System: NetBSD fnord.ir.bbn.com 1.6.2_STABLE NetBSD 1.6.2_STABLE (FNORD) #9: Thu Jun 24 11:55:53 EDT 2004 root@fnord.ir.bbn.com:/usr/home/gdt/QUIST-current/netbsd/src/sys/arch/i386/compile/FNORD i386
Architecture: i386
Machine: i386
>Description:
Packages.txt explains how to use DEPENDS+=, but doesn't explain how to
depend on either or two packages.
>How-To-Repeat:
Try to get mklivecd to use cdrtools-ossdvd if installed rather than
forcing cdrecord, read Packages.txt before posting, and get told the
answer in email.

>Fix:

Index: Packages.txt
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/Packages.txt,v
retrieving revision 1.341
diff -u -r1.341 Packages.txt
--- Packages.txt	24 Jul 2004 01:57:07 -0000	1.341
+++ Packages.txt	28 Jul 2004 14:10:46 -0000
@@ -2193,6 +2193,12 @@
 library has changed with version 3.5.4 and a package would not compile against
 an earlier version of tiff.
 
+If your package needs a program or library which might be installed by
+several packages, use {pkg1,pkg2} in the depends line to express an "OR"
+dependency:
+
+	DEPENDS+=	{cdrecord,cdrtools-ossdvd}-[0-9]*:../../sysutils/cdrecord
+
 Please note that such dependencies should only be updated if a package requires
 a newer pre-requisite, but not to denote recommendations such as security
 updates or ABI changes that do not prevent a package from building correctly.

>Release-Note:
>Audit-Trail:
>Unformatted: