Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 2006 18:05:23 +0100 (CET)
From:      Ganael LAPLANCHE <ganael.laplanche@martymac.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105868: Management of auto-detected configure options (includes a live example with amarok)
Message-ID:  <200611261705.kAQH5Nsc004709@home.martymac.com>
Resent-Message-ID: <200611261710.kAQHAFcF065546@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         105868
>Category:       ports
>Synopsis:       Management of auto-detected configure options (includes a live example with amarok)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 26 17:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Ganael LAPLANCHE
>Release:        FreeBSD 6.2-PRERELEASE amd64
>Organization:
http://contribs.martymac.com
>Environment:
System: FreeBSD home.martymac.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sat Oct 21 10:24:44 CEST 2006 root@martymac.com:/usr/src/sys/amd64/compile/MYKERNEL amd64

>Description:
	Some ports activate a --with- or --enable- configure option if a variable is defined, but don't add the corresponding --without- or --disable- option if the variable is not defined.

Unfortunately this way of handling options is not very accurate, since configure scripts often try to detect what you have on your system and activate options following what has been detected. This way, having unchecked an option in the port's 'make config' may result in having the feature activated anyway... Even worse, if this detected feature requires a special library, the dependency is *not* recorded in the DB, so anyone may break the application by uninstalling the library.

An example with the audio/amarok port :

- I have libgpod installed on my system (not used by any program)
- I don't want Amarok to be built with iPod support so I uncheck the option
- The configure script is run and detects the lib
- Amarok *is* built with the gpod option
- I can uninstall libgpod (no dependency recorded)
>How-To-Repeat:
	Just try the example above...
>Fix:

	I have attached a patch to correct the amarok example. Unfortunately, this may happen for a lot of ports !

How can it be fixed ? No idea. Should each porter add (force) the corresponding --disable- or --without- option for each --enable- or --with one (as it I had done in net-p2p/amule2) ? This is quite painful and may result in a heterogenous ports tree. Or could it be done automatically by the modifying the way .mk files manage options (not pretty sure about that, since options are not predictable) ?

--- Makefile.old        Wed Nov  8 15:25:40 2006
+++ Makefile    Sun Nov 26 12:07:00 2006
@@ -49,6 +49,7 @@

 .if !defined(WITH_GPOD)
 PLIST_SUB+=    GPOD="@comment "
+CONFIGURE_ARGS+=--without-libgpod
 .else
 LIB_DEPENDS+=  gpod.400:${PORTSDIR}/audio/libgpod
 CONFIGURE_ARGS+=--with-libgpod% 


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611261705.kAQH5Nsc004709>