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('_', '.') From patchwork Tue Sep 3 21:13:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157308 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="a/s3f62L"; 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 46NKSl3Mz1z9s4Y for ; Wed, 4 Sep 2019 07:13:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27E4E869D1; Tue, 3 Sep 2019 21:13:56 +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 c1UcArSgB-cd; Tue, 3 Sep 2019 21:13:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 970A686916; Tue, 3 Sep 2019 21:13:53 +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 4BF7C1BF59D for ; Tue, 3 Sep 2019 21:13:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 47ED68284B for ; Tue, 3 Sep 2019 21:13:52 +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 nKk686amHWpy for ; Tue, 3 Sep 2019 21:13:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4EF5E81F70 for ; Tue, 3 Sep 2019 21:13:51 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id c12so14078779lfh.5 for ; Tue, 03 Sep 2019 14:13:51 -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:in-reply-to:references; bh=R/S4baXA7ao47McahMETuqserP/equ/PzcAXukowJFQ=; b=a/s3f62L2s27uW5eE4kfnorV7DWucl+Fh6IhSC+MdlVaSXfU8QZD6cgkhULA+thoSN m6AvqQj5HB7tY+xSCpX4oMTukGW447yZ65l8pzM2jru5IQMz2qf5W+LGf+qQXSWClfMl LkQsn4cViCrF2pFaY4NlgmPZ8AwtWcFyfrBLqeP5s1GolYuuaErEivokcGb+aHrRjvtZ 2rHdO4jgy5SfcQub/DctnvQOMALrjXo0r6438K2kxVm9HkIyro96UyFVKDy7daWb2kt0 KyYzSmxCKQLdI6z4GBYdtsRtskvHgUxd0sA43oN/VHWMNhQpUVBFr+pOzORnMf/uJUvI x5jQ== 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; bh=R/S4baXA7ao47McahMETuqserP/equ/PzcAXukowJFQ=; b=DqOaNlFwGhmcvARZQ+4VRtECr+/vZZSsQoXK99xD7GPCTzdLJsXa8kXJbjf3PY4pDF 7lbAdgfJdtNhzdLA1B4hybbQ523aBxTBam7qex2dRrYr9ZKVxxA86zAA/eoAe1JPnz0j Z2ojTCFI2pOL1mCwhdEBPpt6K8DbWpSG69/SARbODgcAxkYY5gc5e/7HB60zcuyxJeWp Lf5x0hueDgzc3x2HLZsL81O2JxIt7Mi2xY0xPE+iAJJuv/xGHevfBjuaZrUW9qC76Y15 LZSV8C/5pt41dV9VnqQYuAutqor8wUTnJyRsniK+sc6FUhRS3jH+FBvFaaWA9h/zU2no 2HtA== X-Gm-Message-State: APjAAAXQfaAMIl5JpcesZ34ECsisRJj3ieXt8gdUrUU3SXz5v/zG/n+P 5vjRVEdgUUnAm5czPq/QvA/bL9czeBc= X-Google-Smtp-Source: APXvYqxxOZxcLHFo078HZkVNr4iLzPV1m7I9vrHS8/ZYtiJy9c1qjvH3wB0dNMuN4BsypoTlpumMWg== X-Received: by 2002:ac2:41ca:: with SMTP id d10mr8297659lfi.11.1567545229438; Tue, 03 Sep 2019 14:13:49 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:48 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:25 +0200 Message-Id: <20190903211341.10341-2-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 02/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: change the type of variable 'level' 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" Change the type of variable "level" to make it a class member. It will be used not only locally. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index a3fbd0e69e..8fad36f5ac 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -93,12 +93,12 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("menu"): self.state += "-menu" - level = self.get_level() + self.level = self.get_level() try: - self.menu_of_packages[level] = text[:-1] - self.package[level] = "" - self.print_package_warning[level] = True + self.menu_of_packages[self.level] = text[:-1] + self.package[self.level] = "" + self.print_package_warning[self.level] = True except IndexError: self.menu_of_packages.append(text[:-1]) self.package.append("") @@ -115,16 +115,16 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.state = self.state[:-5] elif source_line: - level = self.get_level() + self.level = self.get_level() new_package = source_line.group(1) # We order _ before A, so replace it with . new_package_ord = new_package.replace('_', '.') - if self.package[level] != "" and \ - self.print_package_warning[level] and \ - new_package_ord < self.package[level]: - self.print_package_warning[level] = False + if self.package[self.level] != "" and \ + self.print_package_warning[self.level] and \ + new_package_ord < self.package[self.level]: + self.print_package_warning[self.level] = False prefix = "{}:{}: ".format(self.filename, lineno) spaces = " " * len(prefix) return ["{prefix}Packages in: {menu},\n" @@ -132,11 +132,11 @@ class CommentsMenusPackagesOrder(_CheckFunction): "{spaces}correct order: '-', '_', digits, capitals, lowercase;\n" "{spaces}first incorrect package: {package}" .format(prefix=prefix, spaces=spaces, - menu=self.menu_of_packages[level], + menu=self.menu_of_packages[self.level], package=new_package), text] - self.package[level] = new_package_ord + self.package[self.level] = new_package_ord class HelpText(_CheckFunction): From patchwork Tue Sep 3 21:13:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157309 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.138; helo=whitealder.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="mlU74yfv"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NKSs0mnQz9s4Y for ; Wed, 4 Sep 2019 07:14:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DC8F181D66; Tue, 3 Sep 2019 21:13:59 +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 LD+6CPTYDjKu; Tue, 3 Sep 2019 21:13:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8E0B187797; Tue, 3 Sep 2019 21:13:57 +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 554AE1BF59D for ; Tue, 3 Sep 2019 21:13:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 526A38284B for ; Tue, 3 Sep 2019 21:13:56 +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 XeV4B1iXYmUn for ; Tue, 3 Sep 2019 21:13:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id D3F2F81F70 for ; Tue, 3 Sep 2019 21:13:54 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id z21so14094040lfe.1 for ; Tue, 03 Sep 2019 14:13:54 -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:in-reply-to:references; bh=4pyW4Jkaegy08rUt4Ppp++wpM9kA6Js5BZhY1xTJASI=; b=mlU74yfvvuvZ4CaUlJm6tijwth7Z4A1z12XVA8aJFjb0oYz7gW3UMrgwcFtRg9Fcdt MTIs2m0sxw5PCtvWnvbgx/UsAxpLbkaLixGy09MwswCqkBX3nXdlXyVQ4ykMQQO8CqiI M/XEgacwswey+brWsemqKTRxo0YMfjvpG7heUthwDcs7xvyqMpJrm2KFZZgg5C//19WD NKDsU1TSKRxYmm2Aaw89gFpZhFeP0eDVJFPk9KZReFdzTYD5dNhczMKczySRmV12V/NQ Ff6xr0Px+gAytKeHkTE+GSldbWSDEyXyo7hHgFh0NMuFkvidc9CBWKHsf7L2vgcrV72Z AX0w== 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; bh=4pyW4Jkaegy08rUt4Ppp++wpM9kA6Js5BZhY1xTJASI=; b=crjurTE8OIHdka1mfJpZH7MeWphM8vZlyhC+l3tAnMOnOUui9yFIBkQt7wnuALWP3r DYT/nusC63cZQY0mm/LfZyHbI5mquyhNTvPHopWLXdmiOZP0WtCmGkv8jAIZWCPAwvIl aEjlvPbdBiOTdidp4q7x22wMtdBlotb25mPS8diYjLeAEtYZGyUsqaMWvGjez78SReGp Txt36g/8PQA7JDqR1wiqWEGFQfk7bddHQnfBzMyLrXUlEer+c+d/uVe7v4rcs0zI9AX2 LEhfAv30eRK5ovBWIvOOVmiBN4JfWiHndjbZ+ls5U6sbzHLaDPDMobyWiLYIFTaj8bEO EiTw== X-Gm-Message-State: APjAAAWZoXviuvR4Men/7oZljs0Ybs2VxjIucLkmKPubHNP5SQkabKXv n7AUwWgpY/FdI8oB+B2jQrG4t8xGl4w= X-Google-Smtp-Source: APXvYqzZ63nACohmDUeS46MYO51U2qtA6DPtlp18izJCObdmHSCjSb4vV9UpOjIxr4VvHuOM+WYVWA== X-Received: by 2002:ac2:5297:: with SMTP id q23mr15217843lfm.78.1567545232973; Tue, 03 Sep 2019 14:13:52 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:52 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:26 +0200 Message-Id: <20190903211341.10341-3-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 03/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: get value of variable 'level' 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" Get value of variable 'level' only just after the state change. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 8fad36f5ac..e6a5f1b182 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -114,8 +114,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("endmenu"): self.state = self.state[:-5] - elif source_line: self.level = self.get_level() + + elif source_line: new_package = source_line.group(1) # We order _ before A, so replace it with . From patchwork Tue Sep 3 21:13:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157311 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=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="IKVM1yk7"; 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 46NKSx1QQvz9s4Y for ; Wed, 4 Sep 2019 07:14:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D0334883AD; Tue, 3 Sep 2019 21:14:04 +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 X9cU2gupUYaX; Tue, 3 Sep 2019 21:14:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9AECF883C8; Tue, 3 Sep 2019 21:14:01 +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 9A89D1BF59D for ; Tue, 3 Sep 2019 21:14:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5F0DC81B71 for ; Tue, 3 Sep 2019 21:13:59 +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 2k2Qowu-tIzk for ; Tue, 3 Sep 2019 21:13:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2B13781F70 for ; Tue, 3 Sep 2019 21:13:57 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id t14so17546601lji.4 for ; Tue, 03 Sep 2019 14:13:57 -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:in-reply-to:references; bh=lz5WA+h4aoTeznR2LMwLqoc5yWcu/+g6e8EN5Zc7F/E=; b=IKVM1yk71mAGblGJIt3O78tnZB+7x1Q3fXoRc4N5u5KDPKZYbypnUf5TxU7Y6zvDkg Xegjg/6DZtgrG4liPSHrjQ2+TFviOCOB44iVp3BRoiXuHiKa2EP+agFk0z7aTeSrxk5X lYX71z2g4JMt0y7kKbbJ6ZrtC/HbsCv2gBBgL0RW5JEM6WkC3AnYBMaOn+8C5fu8GeLg t2jOFIPf8jFhOpI0MxuLSRtGhJkXiUjYPxUB3m9DMtnIZ9DCwBqKKoD9KM2PTNjlYykf 8fxRhmf15QzyRRj2uW3mMV1J2KwH6AqvDA5Vp019UmzZD3GIAVPqgjQ2SCGEAcv0yTou Jj5w== 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; bh=lz5WA+h4aoTeznR2LMwLqoc5yWcu/+g6e8EN5Zc7F/E=; b=m8KqlWXyvIPHVhCjbvX6vuZOt2E/OT7nFPZ4jQ7Q/Pfkp8g7n2Cg9pUaThI1FjwzDr gEDNip8PKrvnHtbQLsNew/ZV5y6922Fo5F5svmndw4HpgT84PLggZnLVHRzBL6y6Iav2 UMRBw8WEl2JaJwzlH5jiq5S5IpeEARLLJQVWgvy1LHIvNm4416vOtMBD3y//GhcmroSm whAa0eYHJKq2/vef7cbvO1oJysxU1+d9WgfenKMiOTuAHlo+CHz3ZlKttvpwRrUWgpun ZPVa3CCf1q6LRxYGf6id8aflDWAzjYewGwpG5hPcP4dm9nE1d4tsAkY2/n5ZYqrq3pce lXtA== X-Gm-Message-State: APjAAAX24msrIib+HMrdBz8gX3X+cSO3lgVYCzgJVTBYTMilcxBC4+t1 2yrMwFPRgcHU6n/aVtkw8TLY74Ujjs0= X-Google-Smtp-Source: APXvYqwX2nAHTS7/ltyDQTvLiyVzvdTGHzYxAYBgOhDNd6CVmyuYCs+DScrj3Vi/77PlJ5HUjI76aA== X-Received: by 2002:a2e:9104:: with SMTP id m4mr2814716ljg.28.1567545235279; Tue, 03 Sep 2019 14:13:55 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:54 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:27 +0200 Message-Id: <20190903211341.10341-4-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 04/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: add functions to initialize arrays elements 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" Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index e6a5f1b182..f8bfe6a577 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -71,6 +71,20 @@ class CommentsMenusPackagesOrder(_CheckFunction): def get_level(self): return len(self.state.split('-')) - 1 + def initialize_package_level_elements(self, text): + try: + self.menu_of_packages[self.level] = text[:-1] + self.package[self.level] = "" + self.print_package_warning[self.level] = True + except IndexError: + self.menu_of_packages.append(text[:-1]) + self.package.append("") + self.print_package_warning.append(True) + + def initialize_level_elements(self, text): + self.level = self.get_level() + self.initialize_package_level_elements(text) + def check_line(self, lineno, text): # We only want to force sorting for the top-level menus if self.filename not in ["package/Config.in", @@ -93,16 +107,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("menu"): self.state += "-menu" - self.level = self.get_level() - - try: - self.menu_of_packages[self.level] = text[:-1] - self.package[self.level] = "" - self.print_package_warning[self.level] = True - except IndexError: - self.menu_of_packages.append(text[:-1]) - self.package.append("") - self.print_package_warning.append(True) + self.initialize_level_elements(text) elif text.startswith("endif") or text.startswith("endmenu"): if self.state.endswith("comment"): From patchwork Tue Sep 3 21:13:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157312 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.138; helo=whitealder.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="PSlf8J+x"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NKSx5D20z9sDB for ; Wed, 4 Sep 2019 07:14:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C114387847; Tue, 3 Sep 2019 21:14:07 +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 ZIo1aWyuTrqq; Tue, 3 Sep 2019 21:14:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 13DE1854D8; Tue, 3 Sep 2019 21:14:03 +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 AA5A71BF973 for ; Tue, 3 Sep 2019 21:14:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3CB8381F70 for ; Tue, 3 Sep 2019 21:14:00 +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 QnwsyOc5IPKv for ; Tue, 3 Sep 2019 21:13:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id D7FB28784C for ; Tue, 3 Sep 2019 21:13:58 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id x18so17541108ljh.1 for ; Tue, 03 Sep 2019 14:13:58 -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:in-reply-to:references; bh=vJNHvUsuOadWqhAPVXrJFAsk7HnBIubsdtlPHluUayI=; b=PSlf8J+xRAFBL9WhCTND8IsDAWXBfrEjUmKlz9/mYD2cpUMrPLkhGV+HMjW0ehLpRJ VxZeb9UaEkDtoGI6c26oMb/JQyamZQm46ywhTDgTumBeqrDRNIfcZrYIOId7X0qIQJj3 6Nnlt3PEOTsMFsiR0o/489ssoPnu4stP0pZ4Z4/8bHkWdn0d+vpSRlU1yYFrNKv17FJj lChdwW5RaiL43w4n3K6q9tCpi059/hnzxFUQCsk4he5r5sBgyqI25106bxln+hCMUU0C YFgKjyP0T7bhu8mCqxODlTzjjBAuGgjTCOKAJdtHHduoH4+heNJuii/7Jsyl+m0MvvjN xOvQ== 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; bh=vJNHvUsuOadWqhAPVXrJFAsk7HnBIubsdtlPHluUayI=; b=NqOdcWuljRrr+2pglBIeYLKOYdArgG6aSz7xZeCtDuLjO7pCLOPOuPs/dy+1BNOiR4 6bSPk5RiUcTncRGItRXcOUDAz9Fe/kEzYH0UNHDuVlDZuiisbMwKjfvnJl7EPJRqBq0Y GHp8Qgcr0i5C/f13vQ4z8M/pdHWEHN/hMWoPjDtxOh1WionNNkA0Kxb58/6kKRDbYBe8 FpBpTbZRv0AnuLpeyNiG0vuUGrtfHC/J59mnXmfGkz1hbXvcogoR17wYMkjfvMM1N0Ek laKMK9WuTE+cJ5kCSLZyP8v11qNYubDUA2pBdirHEchB7/IqT8jjA2S6h5YBrfspz2Fa Sa4A== X-Gm-Message-State: APjAAAWHhcbmJuGFC9Ij1FrCkLv9N82BqDh4sk6HqXRKPXLjrzsa/bgY sBzHwsEnzbpEDYZ3SIAdI1cpCZGRbyA= X-Google-Smtp-Source: APXvYqyjMmpekzqBE6KrC4m28U2mU/okO8vCMsD2Zgcm32/tX1q9OL6LrxcWfEpyiBTJlRIuQsX3Gw== X-Received: by 2002:a2e:a40e:: with SMTP id p14mr7719773ljn.29.1567545236985; Tue, 03 Sep 2019 14:13:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:56 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:28 +0200 Message-Id: <20190903211341.10341-5-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 05/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: change the type of variable 'new_package' 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" Change the type of variable 'new_package' to make it a class member. It will be used not only locally. Also initialize it. 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 f8bfe6a577..de5faa19a2 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -67,6 +67,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): def before(self): self.state = "" + self.new_package = "" def get_level(self): return len(self.state.split('-')) - 1 @@ -122,10 +123,10 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.level = self.get_level() elif source_line: - new_package = source_line.group(1) + self.new_package = source_line.group(1) # We order _ before A, so replace it with . - new_package_ord = new_package.replace('_', '.') + new_package_ord = self.new_package.replace('_', '.') if self.package[self.level] != "" and \ self.print_package_warning[self.level] and \ @@ -139,7 +140,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): "{spaces}first incorrect package: {package}" .format(prefix=prefix, spaces=spaces, menu=self.menu_of_packages[self.level], - package=new_package), + package=self.new_package), text] self.package[self.level] = new_package_ord From patchwork Tue Sep 3 21:13:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157313 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.138; helo=whitealder.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="K5YtpmM7"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NKSy5qbSz9sP7 for ; Wed, 4 Sep 2019 07:14:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DFF4C87856; Tue, 3 Sep 2019 21:14:08 +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 piHgTPxEBfZp; Tue, 3 Sep 2019 21:14:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4511F8610A; Tue, 3 Sep 2019 21:14:04 +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 2C9761BF59D for ; Tue, 3 Sep 2019 21:14:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2875B85040 for ; Tue, 3 Sep 2019 21:14:02 +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 RhPSMpnrpL6U for ; Tue, 3 Sep 2019 21:14:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2FA348284B for ; Tue, 3 Sep 2019 21:14:01 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id z21so14094224lfe.1 for ; Tue, 03 Sep 2019 14:14:01 -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:in-reply-to:references; bh=vb8fvBwqge5UZu9TjzSdykCK7iBS4KhsyVuvsX9npJE=; b=K5YtpmM7RgdlwcdW0hdy92BUEjx1zeA6QxUJezAI31AwuYSvJCYAh0NY0/Iz458noc n9KzktUiNSb/ICS0gZ5+TFHGqxPuocrnNlGGgmfseAdO9FTVaKte5hMMkcdSh21FC+Z7 U6q5pF3hBz38SrC+dDA0SLvYjEFPLwwibGqtuo51TFZpqxktaJWX3HhfwrDg2tObv0x8 XFdZjb9oTsndgGHyNqp0isxS4ASlLSZ1CDmjSjKWK1Qz9pmVocDqvpuCafy8L3Mw9gPX l3F16buwk5iDIjQvZFCCLolSKm5U7v0DfS6STIpxaIVGI/tmADQ8iTVlJyq8kwGxS8hU ZTGA== 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; bh=vb8fvBwqge5UZu9TjzSdykCK7iBS4KhsyVuvsX9npJE=; b=gBR+orQ56slfxRVSiVOsHqNns2nADi6P8hUuivGwCqCO3Z4zs49yYfNTiWgMEBZiIo G8zMPfQDoMXYmDC+x9THng0+K1erCl7ANmBc04v4nfDz+1Hk2uq4KzBWtpk8fteLTtKC fVvvT4MhxJsGDaqaYTiFgQ6CZLiSZTSnLjeys9iQyrCnNU4Ia83ftSwzAwCiPIXTylkp BIO2RML+vk2seqPURVHcUpo2VKrDyjcovif4IEBa5Ydnb9hbJd7RMFC4+pGdAt0sPvN9 gllgKmumv3SUBlzVEf94FHfcQ/OOV3TfxzjErENEVNzUv3ZmTvwc3xCLBt2yn0wb1t9m 9ydw== X-Gm-Message-State: APjAAAVY9tnihMP/P9D7BEsAD0XbVuAtKEosRK0SNnF4zi/qY3Ahka2T C4etDd2QTChNHtbNPkuF2pcQ2wv6ymw= X-Google-Smtp-Source: APXvYqyH/J81FBP8qgnLRH7mH68SoNKrfOuqFny2jY5O3qQanL2s2njuli3ncprdw7KwzjDeosdTSA== X-Received: by 2002:a19:f204:: with SMTP id q4mr8008770lfh.29.1567545239223; Tue, 03 Sep 2019 14:13:59 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:13:58 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:29 +0200 Message-Id: <20190903211341.10341-6-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 06/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: remove '-comment' state before the '-menu' one 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" The comment may contain packages or if-endif block(s) but not menu(s) of packages, so lets remove the '-comment' state before the '-menu' one. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Ricardo Martincoski --- utils/checkpackagelib/lib_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index de5faa19a2..d8f26ef435 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -106,6 +106,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.state += "-if" elif text.startswith("menu"): + if self.state.endswith("-comment"): + self.state = self.state[:-8] + self.state += "-menu" self.initialize_level_elements(text) From patchwork Tue Sep 3 21:13:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157310 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="tnqFf7Rv"; 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 46NKSv5HDVz9s4Y for ; Wed, 4 Sep 2019 07:14:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3427685F5D; Tue, 3 Sep 2019 21:14:06 +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 EgJ5IhLFOEL0; Tue, 3 Sep 2019 21:14:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9FE5A864D0; Tue, 3 Sep 2019 21:14:05 +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 509801BF59D for ; Tue, 3 Sep 2019 21:14:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4DD1C86138 for ; Tue, 3 Sep 2019 21:14:04 +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 gtnS1332u6tx for ; Tue, 3 Sep 2019 21:14:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id BF73685040 for ; Tue, 3 Sep 2019 21:14:02 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id t14so17546815lji.4 for ; Tue, 03 Sep 2019 14:14:02 -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:in-reply-to:references; bh=epIxJ3yKylDAoVzVfWZbtzhLCdzTj5H/+QqRdG52GnQ=; b=tnqFf7RvwYyy/Wz8MdHD/MFww7Gi6MRAp6GS8nMRHuWENrJXTTpEQbB07Q8bSW/gX8 7BB9+gAqeyrdQ72LpkiWodc2Y7hAK7rT7J1C2gz/rDjMLeja/fX2AK8FvezRw/Kdqi4Q j9PTsUDp6hl8ka2lPtDuz+3nNFEmhu8PwUKVx9sU1OwHkbIyTV201trCGENH+keH32T6 Mn/aWo9ATvJzazGH5v7bJpK9zkVXSGfaFAHiY2tLVKa7YFgfyfC+iEn2LSfyHsMg7LIo FXdgLeL/uf1DhexTNdiB8qCzKoCEmEXbPllYF6JwzmtaA7Bn2m2sKRdA7+qnXmWZ03q2 4d3g== 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; bh=epIxJ3yKylDAoVzVfWZbtzhLCdzTj5H/+QqRdG52GnQ=; b=tTL1Ns7SJ0CWup/iR2EkbkZuFZ2MMxMCGfU0lq/S3Tk3TCT6VvKWQ74OYWhjsJUrXq c0gN6A4em5g61u3C24kqLa/Cx1X+etz5Ek25ZwZ4JIyhBCAPgWLHCneQuthZe3WmcFx8 f9HgqpQIGqByJYxiffr6myvUDC0DXyBMtG9sOOtz4MNcE4Wxss4IybuakIPpUjiLrgPf WxyvOGBjffT7aRLsTD/g5cNNHXwELbJzZY1uTGcPRYU0DVtzj2PgVxrWyspbZt1U1AxG Pk0eKEmLkqlz6gckqbSY+kvKQv+S7m6ar85k518cFcX+d7UjN5THals3lImmCcKZ1HCP 4V7Q== X-Gm-Message-State: APjAAAWmP6z3re2nFA5RT+bBFTvsyVOPRIZ/pvRYQ46XAgQG+q0XUiFv kXDHXyKm7q0gIuIsyj+3jjb52bp6tfM= X-Google-Smtp-Source: APXvYqzkxRFexbI7RUCTAJwRgPGN0dmsWZSfMrbCvqBr3Q9Ps9QK/BoP2sNB4sib/OVkxw/ZylSDrw== X-Received: by 2002:a2e:9e42:: with SMTP id g2mr20751449ljk.130.1567545240897; Tue, 03 Sep 2019 14:14:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:14:00 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:30 +0200 Message-Id: <20190903211341.10341-7-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 07/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: separate the lines support 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" The lines 'comment...', 'if ...' and 'menu ...' will be handled without sharing any code so lets separate their handling. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Ricardo Martincoski --- utils/checkpackagelib/lib_config.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index d8f26ef435..7f92f580b8 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -94,22 +94,22 @@ class CommentsMenusPackagesOrder(_CheckFunction): source_line = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) - if text.startswith("comment ") or text.startswith("if ") or \ - text.startswith("menu "): + if text.startswith("comment "): + if not self.state.endswith("-comment"): + self.state += "-comment" - if text.startswith("comment"): - if not self.state.endswith("-comment"): - self.state += "-comment" + self.initialize_level_elements(text) + + elif text.startswith("if "): + self.state += "-if" - elif text.startswith("if") or text.startswith("menu"): - if text.startswith("if"): - self.state += "-if" + self.initialize_level_elements(text) - elif text.startswith("menu"): - if self.state.endswith("-comment"): - self.state = self.state[:-8] + elif text.startswith("menu "): + if self.state.endswith("-comment"): + self.state = self.state[:-8] - self.state += "-menu" + self.state += "-menu" self.initialize_level_elements(text) From patchwork Tue Sep 3 21:13:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157314 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=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="I1f6TcMO"; 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 46NKSz46R7z9s4Y for ; Wed, 4 Sep 2019 07:14:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 259C0883C8; Tue, 3 Sep 2019 21:14:10 +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 xNtEAVh8u2yW; Tue, 3 Sep 2019 21:14:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 8965088476; Tue, 3 Sep 2019 21:14:09 +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 6411E1BF59D for ; Tue, 3 Sep 2019 21:14:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5B06E854D8 for ; Tue, 3 Sep 2019 21:14:08 +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 mPO6sz+-qp9d for ; Tue, 3 Sep 2019 21:14:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6216185040 for ; Tue, 3 Sep 2019 21:14:04 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id u13so14054653lfm.9 for ; Tue, 03 Sep 2019 14:14:04 -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:in-reply-to:references; bh=xBYSmDa2o/6gP7HU5rCkAr8VehRYe5xjrQrLFXJKb1I=; b=I1f6TcMOkTtXNNMHHyQ9yHiyUl67XXQBYJmAlePfDkG3PLmy37Q/PwNSaOsJNQwQ+O cO0+Q3geIkbneULqcd0DHqHIvRyKfXeHmP952lXoJaPIHHhWsc2RbIr/yFJOaQsUPiq/ LrnJVeCnn8KF0yaZffkPkV0GkwqvZSTt2ebKnuNr/Z0nf1VPIFVXLTdfeJyU0i7CKGFS Vrl23xZLgEK4CwDteKwHK/fiYZzA9oGfmaeRcY/dTa/j/4GeeOxyvDpaCxBvvkGj3d5n Y2AtfQfpSy4AT7zySqdtcetOCqzTHPdnBDKa6ZZvvBn722vTAJlWMVfwhzYXYnnCbYvL oJ6w== 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; bh=xBYSmDa2o/6gP7HU5rCkAr8VehRYe5xjrQrLFXJKb1I=; b=aW0E0pP+Wi+OXyKraOIC2cxaUWVF//6w85ai+3l+G9LZSfl43XJt+i3E2brKnKspv9 VsYGbidUvNKdZr0BN+GyA2XwjGgZscb+Gk66WgJ6Mim5FYIUxKFRO83zFj5M0aEIv7pF a8NIAPGfkimx/1YKFlpRyoBp/Uq7R1aXWdc8LCrIo6SsRjc6FS56OdnlbcL0kPa89ykL /LxVKMr+xbm1Hklvjwv4q/1ASHsexbNnNDgrYIGXskBl79xHFuUmxe7l0eCHqHbB99hl q3AHYh9kgVoa4mOUC/XnwfAXiBfzEDNA77KYXKQq7+L9psHshv5hVa5lX/i3VuD7PwYB gOcQ== X-Gm-Message-State: APjAAAUG/gWe6ClFHhulnGagO2HTRLHmH232VNt2yVRz3ZHTNV524o4u qLyVrp25ysIGC79gR+D6RJ+2IAzePrw= X-Google-Smtp-Source: APXvYqydXLnpo4WtD3qTq5lxmeP8900hWEA5nounOhMpqDigLWJgFxGjO5gfrXFoxKPvwY549GTbpA== X-Received: by 2002:a19:c709:: with SMTP id x9mr22118165lff.20.1567545242489; Tue, 03 Sep 2019 14:14:02 -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.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:14:02 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:31 +0200 Message-Id: <20190903211341.10341-8-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 08/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: use '-' to describe state 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" Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 7f92f580b8..3d8f08cac9 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -114,7 +114,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.initialize_level_elements(text) elif text.startswith("endif") or text.startswith("endmenu"): - if self.state.endswith("comment"): + if self.state.endswith("-comment"): self.state = self.state[:-8] if text.startswith("endif"): From patchwork Tue Sep 3 21:13:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157315 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=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="BBsWqK2r"; 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 46NKT25mfKz9sDB for ; Wed, 4 Sep 2019 07:14:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5886188476; Tue, 3 Sep 2019 21:14:12 +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 RiTSdmd6odYL; Tue, 3 Sep 2019 21:14:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B43C3884D5; Tue, 3 Sep 2019 21:14:11 +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 2A3261BF59D for ; Tue, 3 Sep 2019 21:14:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2703E86B11 for ; Tue, 3 Sep 2019 21:14:10 +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 uHig7Ih9NzAA for ; Tue, 3 Sep 2019 21:14:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 18C248582C for ; Tue, 3 Sep 2019 21:14:06 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id l14so17522922lje.2 for ; Tue, 03 Sep 2019 14:14:05 -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:in-reply-to:references; bh=DjnXTKnH19EIhHKBCuRE3DXkB4IkM++IzN0I+zNCgmE=; b=BBsWqK2rW467QgxKphfED00gelNvOw5DNvL8zWlXWYWRRI8CPlIPtpedVm6pTu34Cv 43dMM0BWEwDyAJrP3+dQ5bMM9D0m26BtM/hoDFd1ZWUPxANe5buydQE7Th6f5ZRjLTWB WJx24SIXUnGtAG/zyJs9arO1XRNMLF0MJUkuvHyW1nHP/odxRNJoe/ud+/vAXFsXCXz/ 79LXFlUE+vC4K5/tF6H2NRXkfvvP8wZLxYK6d1HkGPzS7QpBepi3e2/Yr6Ag9xnURJRQ wkOit9rGG8VAzealeHVDDol+6+YTNrageo749pzdE7STs9NiIzQwPne+5ImvN6e+jGKN LSVw== 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; bh=DjnXTKnH19EIhHKBCuRE3DXkB4IkM++IzN0I+zNCgmE=; b=P/F1nr+FAnXSMRQug6C7fAn8oJ0XRQclpJoG6PJqwZcNtS3IOAyYOFLTV2gkdJzu0Y 4I+otzBn0+TKm5AhHpUyD+HmpNaItvbufus6//ZRhBO8aAsKsHRHalW2ECICKGg/iUV+ HSWPzhpDbShXchMF4HiVzHEPBO0LKSC2N/5sYEx8lLFBwwZqvt8SbVqiQkXLn35TB2bE ignseYLvwNKwQgMQ5OE4rwqRZUKrFPnppL16+7FKAqjTdoByeFDz1iAr5IkE+0Q5cmKh FtSKKASlHI4Wz1Sn2+K6BUNH4xVNo4Egc7EUzLyCb4xfiG9QKe1V08HJ/6+4UO7Ty39n gOjQ== X-Gm-Message-State: APjAAAWaPEuSwQ7y4PpjNsPgLjaGIUccYSRiTjnGUsnMTFKN+kLHhh+b APjAA3Dx3lW32d6s/jVley8JJ799n6k= X-Google-Smtp-Source: APXvYqxV0vx78gitRoVKlob++P2q2TYUATqdKRyn72PQeMzl4UI2+bcvRnLORA2W/sp09XK7AtGqPQ== X-Received: by 2002:a2e:2f0d:: with SMTP id v13mr16735438ljv.198.1567545244218; Tue, 03 Sep 2019 14:14:04 -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.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:14:03 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:32 +0200 Message-Id: <20190903211341.10341-9-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 09/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: drop function get_line 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" Because function get_line() has only one line so use it inline. Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) --- utils/checkpackagelib/lib_config.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 3d8f08cac9..f39a4b0599 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -69,9 +69,6 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.state = "" self.new_package = "" - def get_level(self): - return len(self.state.split('-')) - 1 - def initialize_package_level_elements(self, text): try: self.menu_of_packages[self.level] = text[:-1] @@ -83,7 +80,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): self.print_package_warning.append(True) def initialize_level_elements(self, text): - self.level = self.get_level() + self.level = len(self.state.split('-')) - 1 self.initialize_package_level_elements(text) def check_line(self, lineno, text): @@ -123,7 +120,7 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("endmenu"): self.state = self.state[:-5] - self.level = self.get_level() + self.level = len(self.state.split('-')) - 1 elif source_line: self.new_package = source_line.group(1) From patchwork Tue Sep 3 21:13:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerzy Grzegorek X-Patchwork-Id: 1157316 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.138; helo=whitealder.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="Uhs4nbsQ"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NKT51GL9z9sDB for ; Wed, 4 Sep 2019 07:14:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A20A181C8D; Tue, 3 Sep 2019 21:14:15 +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 22yqiqf-s2cq; Tue, 3 Sep 2019 21:14:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 228A88582C; Tue, 3 Sep 2019 21:14:13 +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 67C981BF59D for ; Tue, 3 Sep 2019 21:14:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5FBD28582C for ; Tue, 3 Sep 2019 21:14:10 +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 jnbNma6ZBt4N for ; Tue, 3 Sep 2019 21:14:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id B879C877A4 for ; Tue, 3 Sep 2019 21:14:07 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id l20so3046541ljj.3 for ; Tue, 03 Sep 2019 14:14:07 -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:in-reply-to:references; bh=czywf94vAhDlIUppgwJBSfHzsXDOl/UEKDG3lTPk3PU=; b=Uhs4nbsQZClANmBWYm/o1+H7C7LTG6CHHO8ZhFjMlrYu/BkY4OK5SYOg7oAmfOb5Ns zbj/FZIEDSV/k/AS42pwCwu0vFDCrxLBYOga1IgWNqLlFc5yFa71Nj/bojC5WBuWWVXU k5Idx9Vxgf1f2mO1MObBKqqnt+aoTgF+6OvNZQRgdeyE1RGYJMZ1ug06Gi2bDhy4liYH X1miu7UfNlQ4l/Ro91ksPwvMhv5nSMiFtz2NMn8UwYDFbx72xj3pMvSCU12PQ0BfRCwZ ovsk/RrykOFSVAfYcWBqhr/hrGC42VXFH9qLF+KJG5HkUDAALif6dTn4VYPSVrxfBwAP o3FA== 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; bh=czywf94vAhDlIUppgwJBSfHzsXDOl/UEKDG3lTPk3PU=; b=VbCmOphe7NGQDotlkUDKh5N3yiGz/G6xI5lS0OtpS71NPC1uQTF3UB5K9UezCjWD4o G5n7eA/q7BcusxdKW5CUtrQPvcRECSKtjzHpA4ZO+w+jCeiYh6j3oYIy30UIzliEDNYZ qpNus3tjxXw4xKixw3qGQ1lLqMeQlzOOqhh+QiVSlgFNm2qdm+vHV3Pi21JFQoCcaQ9t WBz1bzKLqlJwDau72ezr0S+uTE3pDDxb6qTYHEt4OaQgLYO1VYhPQ8L7vY1MECk2wi/P 500rHZhAmUHB14yXsrsyNP6kvlJKmhD9Htue1vJivBD8qS+Ao3vpvYXPRCi7VDXP5tRh onGg== X-Gm-Message-State: APjAAAVlU2b+73E6K8hDEnNsdHGrw7mYHK791WZ8I+7ZEgnk1Izaqq4Q QSFWVtP+IB1iVJGTaEqiZl9DNN9IRB8= X-Google-Smtp-Source: APXvYqzCqTADdpIsBh8EG5Qu2QNa/QwZ9Beo6NItRoBJAxnyVhqHD1fnnVs0w4ebaqZQx2oqtXvlxw== X-Received: by 2002:a2e:9086:: with SMTP id l6mr7176398ljg.120.1567545245850; Tue, 03 Sep 2019 14:14:05 -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.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 14:14:05 -0700 (PDT) From: Jerzy Grzegorek To: buildroot@busybox.net Date: Tue, 3 Sep 2019 23:13:33 +0200 Message-Id: <20190903211341.10341-10-jerzy.m.grzegorek@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> References: <20190903211341.10341-1-jerzy.m.grzegorek@gmail.com> Subject: [Buildroot] [PATCH 10/18] checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: initialize 'menu_of_packages' array 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" Signed-off-by: Jerzy Grzegorek Cc: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Ricardo Martincoski --- utils/checkpackagelib/lib_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index f39a4b0599..f1c709388c 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -61,7 +61,7 @@ class AttributesOrder(_CheckFunction): class CommentsMenusPackagesOrder(_CheckFunction): - menu_of_packages = [""] + menu_of_packages = ["The top level menu"] package = [""] print_package_warning = [True]