From owner-freebsd-ports@FreeBSD.ORG Sun Feb 5 16:43:16 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A2441065670 for ; Sun, 5 Feb 2012 16:43:16 +0000 (UTC) (envelope-from liangtai.s4@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id DC5E78FC13 for ; Sun, 5 Feb 2012 16:43:15 +0000 (UTC) Received: by lagz14 with SMTP id z14so3404166lag.13 for ; Sun, 05 Feb 2012 08:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=H38lMAt3wnUx61r4oWtMIAMZGAdBuYzR6z86XufPY2k=; b=quShTtMr1Akep/+yyD9Lm0hMmappoVPorQWh27cCIhCCrIMTVRnYpTv/H1XQJ3P+vc U4gccJodSqZJ7poEqIQC8g5YAA7OR6+PA2UKnMFyHzpDzubrG0BO5E1wZuB1L16qmAUB Sm1NHtFTUaa43ucuozBx8NcRo2Hcnn2/H/ta4= MIME-Version: 1.0 Received: by 10.152.148.9 with SMTP id to9mr364522lab.1.1328458797463; Sun, 05 Feb 2012 08:19:57 -0800 (PST) Received: by 10.112.13.42 with HTTP; Sun, 5 Feb 2012 08:19:57 -0800 (PST) Date: Mon, 6 Feb 2012 01:19:57 +0900 Message-ID: From: =?UTF-8?Q?Ry=C5=8DTa_SimaMoto?= To: ports@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: Any common policy against conflicting choice in Makefile OPTIONS? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:43:16 -0000 Hi, I'm a port maintainer for multimedia/qmmp, and some ports. Before upgrading QMMP port, may I ask what is the common policy how to offer Makefile OPTIONS containing a certain contradictory pair? Actually the latest version of QMMP supports several versions of ffmpeg, including 0.7.11, 0.9, 0.9.1, and 2012.01.22 that I tested to verify, so it allows user to choose one of multimedia/ffmpeg or multimedia/ffmpeg-devel. As you know you should not select both of them, otherwise they may conflict with each other. I plan to provide an entry for each of them. | .... | [*] FFMPEG Support to playback by FFMPEG | [ ] FFMPEG_DEVEL Support to playback by FFMPEG-devel | .... Then how should the Makefile proceed after the user's choice? When the user did not install any of them yet, it's easy: The installation would obey the user's order except when occationally both of them are enabled that results to fail with an alert message. On the other hand, if one of them are already installed, Makefile would know which one is installed using 'exists(${LOCALBASE}/include/libavcodec/vda.h)' command. So, in fact, there is no question that which version the user want to use. The smartest way would be that provides a single entry which corresponds to the existing version and hides the other entry that should not be choosen. Unfortunately, the value LOCALBASE is not defined until macro is loaded, that means we don't have any proper steps to determine what version is already installed when the Makefile construct the OPTIONS set. So we have no other way than to let the option dialog always show both entries including quite wrong option. Then if the user selects the other one that might conflict with the installed version, there are six possible courses I assume. 0x000. Quit the session with alert message instructing user to retry 'make config' to choose the already installed one that Makefile knows. 0x001. Dare to go through and expect that the depending port deals with the conflicting issue. 0x002. Use the installed version and omit the choice implicitly. 0x004. Warn with short pause, then use the installed version and omit the choice. 0x010. Store options into /var/db/ports/* as are that the user selects. 0x020. Store options into /var/db/ports/* with correction as actually working. (If option variables are allowed to be changed at testing stage.) Is there any recommended policy? If so, what way or a set of ways should I choose? -=-=-=-=-= SimaMoto,RyoTa