From patchwork Sat Apr 5 15:21:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 337180 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 0DD4A1400AA for ; Sun, 6 Apr 2014 02:22:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4C75431D55; Sat, 5 Apr 2014 15:22:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yhtwxid7OiOD; Sat, 5 Apr 2014 15:22:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E425530AC4; Sat, 5 Apr 2014 15:22:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9A4601BF97E for ; Sat, 5 Apr 2014 15:22:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9735E8BF43 for ; Sat, 5 Apr 2014 15:22:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qmg647rB0kgo for ; Sat, 5 Apr 2014 15:22:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5B5618BF59 for ; Sat, 5 Apr 2014 15:22:16 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id bs8so2785421wib.5 for ; Sat, 05 Apr 2014 08:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=4V7VWZsHtM+PGxLXF82fLzmEpJjYFbsLg37uLj4SbAc=; b=yiLD/6ZxgiDDoldsG3TBPldJZgJdWzDHNSqaflgw+EHWh3ivI9ngFEHbOtzbpzraEN J8hiLAngY0W+qp9IQndSaZ6U71Nt+s/Kp1J0+CEBx8kxu/lLhgAHR8ce41tWka1i12QQ iWuZSDzUWaHbTWGyscjfPT43hFwICGazycaIApR0b6ySjs0aJKsjJjHn2Xxinm7kwMfW 3W1oJivIYkCf65X9L+OxQK2i3/9RKcnC5es5jpYXQkDE3i/uIppJ8CLZKrirmN9le+LY nUfAtQmUNKcThUX/vmSm14a5mEba6+7XBcT3/BaH7O6cy4/OB1oIbxN8HEAaxUBrGwrJ v6pA== X-Received: by 10.180.210.171 with SMTP id mv11mr12611597wic.44.1396711335003; Sat, 05 Apr 2014 08:22:15 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id t10sm11403796wiw.19.2014.04.05.08.22.13 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Apr 2014 08:22:14 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 5 Apr 2014 17:21:47 +0200 Message-Id: <78e160f333f72759c0c3c30a7957cfdc29856587.1396711074.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 10/21] manual: add notes about depending on a virtual package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" --- docs/manual/adding-packages-virtual.txt | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/manual/adding-packages-virtual.txt b/docs/manual/adding-packages-virtual.txt index e8820a0..c1b5a0a 100644 --- a/docs/manual/adding-packages-virtual.txt +++ b/docs/manual/adding-packages-virtual.txt @@ -91,3 +91,52 @@ provider, but only if it is selected. Of course, do not forget to add the proper build and runtime dependencies for this package! + +Notes on depending on a virtual package +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When adding a package that requires a certain +FEATURE+ provided by a virtual +package, you have to use +depends on BR2_PACKAGE_HAS_FEATURE+, like so: + +--------------------------- +config BR2_PACKAGE_HAS_FEATURE + bool + +config BR2_PACKAGE_FOO + bool "foo" + depends on BR2_PACKAGE_HAS_FEATURE +--------------------------- + +Notes on depending on a specific provider +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If your package really requires a specific provider, then you'll have to +make your package +depends on+ this provider; you can _not_ +select+ a +provider. + +Let's take an example with two providers for a +FEATURE+: + +--------------------------- +config BR2_PACKAGE_HAS_FEATURE + bool + +config BR2_PACKAGE_FOO + bool "foo" + select BR2_PACKAGE_HAS_FEATURE + +config BR2_PACKAGE_BAR + bool "bar" + select BR2_PACKAGE_HAS_FEATURE +--------------------------- + +And you are adding a package that needs +FEATURE+ as provided by +foo+, +but not as provided by +bar+. + +If you were to use +select BR2_PACKAGE_FOO+, then the user would still +be able to select +BR2_PACKAGE_BAR+ in the menuconfig. This would create +a configuration inconsistency, whereby two providers of the same +FEATURE+ +would be enabled at once, one explicitly set by the user, the other +implicitly by your +select+. + +Instead, you have to use +depends on BR2_PACKAGE_FOO+, which avoids any +implicit configuration inconsistency.