From patchwork Tue Sep 3 21:13:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157307 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kDWC1e7j"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NKSj1pJ6z9sDB for ; Wed, 4 Sep 2019 07:13:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A793A869A5; Tue, 3 Sep 2019 21:13:54 +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 wCwgbJFAKgo3; Tue, 3 Sep 2019 21:13:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BA1C5864D0; Tue, 3 Sep 2019 21:13:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2D8CD1BF59D for ; Tue, 3 Sep 2019 21:13:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2A99A8284B for ; Tue, 3 Sep 2019 21:13:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ASccTJ0SfsM for ; Tue, 3 Sep 2019 21:13:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4A73981F70 for ; Tue, 3 Sep 2019 21:13:49 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id l20so3045838ljj.3 for ; Tue, 03 Sep 2019 14:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Mm1V7j+p2EanYHsoMWWDkdgv1njvwhJW1LBYOrJVlFY=; b=kDWC1e7jzGzHvGosDs4mXhcPRjA9edgvMZ8sa5plvdBq7kEms1KEZmCzEpKZqIyagT e4v/S0s8XXJHQEAGNf+2lXfHNS/e/5omRfsRsJDKoHxBYlTrfqlItLKy7o5gMm4NNoEW v/0ji7C29hPKeSXb5qf2n/Uw4us7n4LZCWoKXB2alHfcq88N1pjsE4P6hFlhW8fq6NP4 YemXKhe1Ua/E1iWlkkCbLOqXlWRTJuIr7Y3PlC2xEHoQh80Oy30jOaZMkKILHlgn2sQL KtEE7jVN1zUPr2EoBR/SuA5v48tAMB8rKhLYQEnqj1e9EeChJ4UBzoxcXh2rOR+AnZO1 L/Lg== 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; bh=Mm1V7j+p2EanYHsoMWWDkdgv1njvwhJW1LBYOrJVlFY=; b=IBEHCAdqxrbsyHg8CEaz+ImA30KFs1zJritaNIlnD+d8F6nbzeg1i0o1oPsrzV1MQ9 z338f6VFPgHSif4A/LjvjAIcm7tO1nDSk7/18KI3bENimbe/iLndnUynD+A1D6pMUGit nQY6iy0TrimtW3Lmc6rMBCn+O+CwsCM/yPFAC9k5jeXw+DIjVbQVER0PyggWYs9UHcry BGuLkNegnJ1C7qBzvLjpK4/hrD+t69IR0V+8lt8mDdX/iNUZkE9MfjxH+E0+7elCbsEy gdwn7xRII4ot/QiN2dOgYHslrmd6ZB857Eb/h1zLVGI5SYycHqM3c9I5n7kvPYniX/0o TYTg== X-Gm-Message-State: APjAAAWGdV/sA7f//IUBjeIHfN0P6pFfPiRT5t9I+aAERxkqRw4VsyRF 66iCc1GwYjsQv6zb5lHik7gGyOsY1hk= X-Google-Smtp-Source: APXvYqwhvHVWeClnOHedO/agxZzlazklwIgwfyceUHdw/HYjP2AHT+1NVBKTIZUYm1surZuej5uenQ== X-Received: by 2002:a2e:9955:: with SMTP id r21mr9036335ljj.58.1567545227363; Tue, 03 Sep 2019 14:13:47 -0700 (PDT) Received: from localhost.localdomain (user-5-173-240-120.play-internet.pl. [5.173.240.120]) by smtp.gmail.com with ESMTPSA id u1sm1650822lfi.83.2019.09.03.14.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:46 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:24 +0200 Message-Id: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 01/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: rename variable 'm' 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: , Cc: Jerzy Grzegorek MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Rename variable 'm' for better readability. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Ricardo Martincoski --- utils/checkpackagelib/lib_config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 225f92af13..a3fbd0e69e 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -77,7 +77,8 @@ class CommentsMenusPackagesOrder(_CheckFunction): "package/Config.in.host"]: return - m = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) + source_line = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) + if text.startswith("comment ") or text.startswith("if ") or \ text.startswith("menu "): @@ -113,9 +114,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("endmenu"): self.state = self.state[:-5] - elif m: + elif source_line: level = self.get_level() - new_package = m.group(1) + new_package = source_line.group(1) # We order _ before A, so replace it with . new_package_ord = new_package.replace('_', '.')