From patchwork Mon Dec 22 10:29:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 423346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 81F251400A0 for ; Mon, 22 Dec 2014 21:38:05 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 56C5C28BEB0; Mon, 22 Dec 2014 11:35:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7943128433F for ; Mon, 22 Dec 2014 11:35:50 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 22 Dec 2014 11:35:50 +0100 (CET) Received: by mail-pa0-f42.google.com with SMTP id et14so5722772pad.1 for ; Mon, 22 Dec 2014 02:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4ePz/YQfp0i3ln63SdIvHk/kMPgnjvO4eFFPHQV9hww=; b=CVnr6LWUoCuuIFYWRu2slzOxJqSNy59P8BZaBumM/ehvJN/9KiFaZzZBnngEGqXfrK agVUQdhiYLRt4jR9EVRBi3FZYVzbd00yMWjFIK/TFOXiWzf9XyAFppBz0ZLfw2gRIq0k LE79cL5u78OJ9KgPYIIhFUvz38mQoPNtZ/ykWU6qo4UopSqBLhSoe4S2GP1k4Hg3+Lje a4/9TxGNMvSfeLpjCJYKcMgyZmy2ubG7wnibKG/h2liOynkYsImoPv76TxdoS+BYyJj+ tjIudQ+STecI1KS8T5geb1d23SEjdlcG2zyGf/OX1NO5ZK151dux1TGqQ1VODjIYFKA1 C1xQ== X-Received: by 10.70.37.79 with SMTP id w15mr33926295pdj.43.1419244663264; Mon, 22 Dec 2014 02:37:43 -0800 (PST) Received: from debian.corp.sankuai.com ([103.29.140.56]) by mx.google.com with ESMTPSA id oa8sm16808007pdb.84.2014.12.22.02.37.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2014 02:37:42 -0800 (PST) From: Yousong Zhou To: cyrus@openwrt.org, nbd@openwrt.org Date: Mon, 22 Dec 2014 18:29:08 +0800 Message-Id: <1419244149-12187-1-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 1/2] scripts: fix recursive dependencies that might be caused by using conditional dependencies. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" `kmod-ipt-ipset' has a `DEPENDS' value of `@(!(TARGET_ps3||TARGET_pxcab)||BROKEN)'. Recursive dependency will occur if another package conditionally depends on it with something like `+PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset' which will produce the following kconfig content. config PACKAGE_dnsmasq-full ... depends on !(PACKAGE_dnsmasq_full_ipset) || (!(TARGET_ps3||TARGET_pxcab)||BROKEN) if PACKAGE_dnsmasq-full ... config PACKAGE_dnsmasq_full_ipset bool "Build with ipset support." default y ... endif And mconf will complain with tmp/.config-package.in:127:error: recursive dependency detected! tmp/.config-package.in:127: symbol PACKAGE_dnsmasq-full depends on PACKAGE_dnsmasq_full_ipset tmp/.config-package.in:157: symbol PACKAGE_dnsmasq_full_ipset depends on PACKAGE_dnsmasq-full Signed-off-by: Yousong Zhou --- scripts/metadata.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/metadata.pl b/scripts/metadata.pl index f3d04db..a2465d1 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -500,7 +500,7 @@ sub mconf_depends { }; $flags =~ /@/ or $depend = "PACKAGE_$depend"; if ($condition) { - if ($m =~ /select/) { + if ($m =~ /select/ or $condition = $depend) { next if $depend eq $condition; $depend = "$depend if $condition"; } else {