Subject: pkg/7808: ONLY_FOR_PLATFORM doesn't work as it's used
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cgd@netbsd.org>
List: netbsd-bugs
Date: 06/18/1999 10:23:14
>Number:         7808
>Category:       pkg
>Synopsis:       ONLY_FOR_PLATFORM doesn't work as it's used
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 18 10:05:00 1999
>Last-Modified:
>Originator:     Chris Demetriou
>Organization:
>Release:        1.4, pkgsrc dated 19990618
>Environment:
NetBSD speedy 1.4 NetBSD 1.4 (SPEEDY) #18: Tue May 18 12:17:14 PDT 1999     cgd@speedy:/a/users/cgd/proj/netbsd/src-1-4-branch/sys/arch/i386/compile/SPEEDY i386

(also on alpha and other architectures.)
>Description:
Many packages in pkgsrc specify that they can only be run on specific
architectures by using {} globbing in ONLY_FOR_PLATFORM.  For an example
take a look at rev 1.10 of the www/communicator Makefile (which I just
fixed).  It spec'd ONLY_FOR_PLATFORM as:

ONLY_FOR_PLATFORM=      *-*-{i386,sparc}

I didn't update it for alpha the other day because I didn't notice it
(because it never failed, when I was trying to install on alpha).


>How-To-Repeat:
Find a package that doesn't work on your architecture but whose 
Makefile is broken in this way (find pkgsrc -name Makefile | xargs grep
'ONLY_FOR_PLATFORM.*{' should to 8-), and try to build it.

Note that you're not told that it's not supported on your architecture.
>Fix:
Either fix the makefiles to specify ONLY_FOR_PLATFORM as, for
example:

ONLY_FOR_PLATFORM=	*-*-i386 *-*-sparc

or fix the package makefile templates to cope properly.
>Audit-Trail:
>Unformatted: