From patchwork Thu Aug 1 08:02:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1140564 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="cpAy4onj"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45zw176PM6z9sBF for ; Fri, 2 Aug 2019 01:57:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 59EBF881AB; Thu, 1 Aug 2019 15:57:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tAbRQsQZhBSV; Thu, 1 Aug 2019 15:57:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4CAA98830C; Thu, 1 Aug 2019 15:56:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 933C11BF3BC for ; Thu, 1 Aug 2019 08:02:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 90BB222735 for ; Thu, 1 Aug 2019 08:02:55 +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 sd8HERE9Y3Pg for ; Thu, 1 Aug 2019 08:02:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by silver.osuosl.org (Postfix) with ESMTPS id 151B72033B for ; Thu, 1 Aug 2019 08:02:53 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z1so72477838wru.13 for ; Thu, 01 Aug 2019 01:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pWzeD4FzzefC9l21489mUAqzNS7dd5BRRIalWo3ShQk=; b=cpAy4onjiAL65kfuzEKSe5V7awj0YdAI17ansj1GG1YXIoPbUStTh1OT0ZUzvF3cv0 +o8vcZu/7U/p6J/Vo8IMHUu1yhNRejSTxwnBrBMR8VJFIJZGYI3TmBFhiCnV/egvOPYi TmHf2fGivHcsv3GtgiEuxmIKf7FEDtcEx5M8F0dRoXul9JmzcDgtO8uWCmADuZI1W7VR /B5CROFlZ8HKW1H7tw96R5KroOJVbOZD3u9lv3C43kVRVaY+NyeFAyaEl8u/rafnxb5Z 6n9DhPnEq5ETIS5nYlJiYXKRz2vRj+uJN93dV2plyZe7YTh+zxnKZhmdZy46Ia1NkKh/ RI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pWzeD4FzzefC9l21489mUAqzNS7dd5BRRIalWo3ShQk=; b=ucYpXINh9/jDjsBtV85xb4v2UFvoRLQ5aybiiJRxZppbok3/fsIgJVSQFAO+0SwjQb ho7Rep+HXAeVeCEr8wPvUf3vKCFPl+Zuq9GdGT0ppPM8es3/wOCa8MXeMPW3cTg0PyNF d6U6JR9wg+Hw8fmzamSYmcegFNxMEOjCqMuXfvQUUONjio2XYkqnp3zxxmJGEyco5H9N tFiFdo4oaDX/25gQuhbudt0TtmkUj7MprhfP6hq/Nh3tq4nRGaFH5j+pO6mPLaiIPnuI 8QGECjASUrAtynL9VS8Rr0zW8W+W+0eRRgIG5znrCsZsQLVmvXieWBSo5IDuSYlyUMYR N6mg== X-Gm-Message-State: APjAAAXySnu2SY4Pys/qhnflhu5rrm7uI4S5CzQds8J4XujWo+mC4f67 lhx5LS2Vzzg+CX3x8GAcR13DMfADCGJyWg== X-Google-Smtp-Source: APXvYqzF4sSHv99WuUl5VFqHz3PprLQTJykypAoIM+/FIigGrrbTY+5cGd/0wBqmRyUtHgC6Z0ZLRQ== X-Received: by 2002:a5d:53ca:: with SMTP id a10mr867544wrw.131.1564646571773; Thu, 01 Aug 2019 01:02:51 -0700 (PDT) Received: from arnoutx1.home (lfbn-1-2159-45.w90-76.abo.wanadoo.fr. [90.76.216.45]) by smtp.gmail.com with ESMTPSA id y10sm58248870wmj.2.2019.08.01.01.02.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 01:02:51 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Thu, 1 Aug 2019 10:02:35 +0200 Message-Id: <20190801080237.5462-2-arnout@mind.be> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190801080237.5462-1-arnout@mind.be> References: <20190801080237.5462-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/3] utils/checkpackagelib: CommentsMenusPackagesOrder: fix 'menuconfig' handling X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The CommentsMenusPackagesOrder check builds the 'state' to track the depth of menus and conditions. However, a menuconfig doesn't create a menu by itself - it is always followed by a condition that implies the menu. As a result, when unwinding the 'state', the level will be wrong. Fix this by checking for menu followed by a space, so it no longer matches menuconfig. For consistency, do the same for comment and if as well. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Jerzy Grzegorek --- v3: use Jerzy's approach of adding a space after all conditions, not just menu. v2: Jerzy independently did a similar change. --- utils/checkpackagelib/lib_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 7d7567ac67..b42760396e 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -77,8 +77,8 @@ class CommentsMenusPackagesOrder(_CheckFunction): "package/Config.in.host"]: return - if text.startswith("comment") or text.startswith("if") or \ - text.startswith("menu"): + if text.startswith("comment ") or text.startswith("if ") or \ + text.startswith("menu "): if text.startswith("comment"): if not self.state.endswith("-comment"):