Opinion on cross-port OPTIONS CONFLICTS

Josh Paetzel josh at tcbug.org
Fri Dec 21 14:44:39 PST 2007


On Friday 21 December 2007 03:43:19 pm Edwin Groothuis wrote:
> On Fri, Dec 21, 2007 at 03:24:20PM -0600, Josh Paetzel wrote:
> > I've recently run across some brokeness in ports that would be relatively
> > trivial to deal with if one port had a way to know about the OPTIONS
> > another port was compiled with.
>
> I have been working on it a not-so-long-time-ago and found that
> this could be the best way:
>
> [/var/db/ports/arts] edwin at k7>cat options
> # This file is auto-generated by 'make config'.
> # No user-servicable parts inside!
> # Options for arts-1.5.1_1,1
> _OPTIONS_READ=arts-1.5.1_1,1
> WITHOUT_ESD=true
> WITHOUT_NAS=true
>
> [/var/db/ports/arts] edwin at k7>eval `cat options | grep -v "^\#" | sed -e
> 's/^/arts_/'`
>
> [/var/db/ports/arts] edwin at k7>echo $arts_WITHOUT_NAS
> true
>
>
> I hadn't put it in a PR yet because it has some synchronity issues:
>
> - It only works for ports already installed.
> - It doesn't work for ports which are being installed by this port.
> - No idea how to do this for packages build on ye olde cluster.
>
> But the idea is there:
>
>     OPTIONS_DEPENDS=	arts
>     .include <bsd.port.pre.mk>
>     .if !defined arts_WITH_NAS
>     BROKEN=		Please build audio/arts first before building this port.
>     .fi
>     .if ${arts_WITH_NAS} = "true"
>     BROKEN=		This port can't work with audio/arts enabled with NAS support
>     .fi
>
> Edwin

It also doesn't work if someone runs make rmconfig, or make config again and 
changes things after the port is installed.

It probably doesn't work if a package was used to install either.

-- 
Thanks,

Josh Paetzel

PGP: 8A48 EF36 5E9F 4EDA 5A8C 11B4 26F9 01F1 27AF AECB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20071221/f2c636a1/attachment.pgp


More information about the freebsd-ports mailing list