From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 26 17:11:36 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 739CB16A47C for ; Sun, 26 Nov 2006 17:11:36 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id E20EC43D5D for ; Sun, 26 Nov 2006 17:09:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAQHAFwE065547 for ; Sun, 26 Nov 2006 17:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAQHAFcF065546; Sun, 26 Nov 2006 17:10:15 GMT (envelope-from gnats) Resent-Date: Sun, 26 Nov 2006 17:10:15 GMT Resent-Message-Id: <200611261710.kAQHAFcF065546@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ganael LAPLANCHE Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A068F16A530 for ; Sun, 26 Nov 2006 17:07:20 +0000 (UTC) (envelope-from martymac@home.martymac.com) Received: from home.martymac.com (home.martymac.com [82.246.139.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 701B643F08 for ; Sun, 26 Nov 2006 17:04:28 +0000 (GMT) (envelope-from martymac@home.martymac.com) Received: from home.martymac.com (localhost.martymac.com [127.0.0.1]) by home.martymac.com (8.13.8/8.13.8) with ESMTP id kAQH5Nih004710 for ; Sun, 26 Nov 2006 18:05:23 +0100 (CET) (envelope-from martymac@home.martymac.com) Received: (from martymac@localhost) by home.martymac.com (8.13.8/8.13.8/Submit) id kAQH5Nsc004709; Sun, 26 Nov 2006 18:05:23 +0100 (CET) (envelope-from martymac) Message-Id: <200611261705.kAQH5Nsc004709@home.martymac.com> Date: Sun, 26 Nov 2006 18:05:23 +0100 (CET) From: Ganael LAPLANCHE To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/105868: Management of auto-detected configure options (includes a live example with amarok) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ganael LAPLANCHE List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Nov 2006 17:11:36 -0000 >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: