From patchwork Tue Mar 13 03:09:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884973 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="Q5EK7qLY"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fy42ZkPz9sT9 for ; Tue, 13 Mar 2018 14:11:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F0BE8662F; Tue, 13 Mar 2018 03:11:05 +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 FzjTpq6NhReo; Tue, 13 Mar 2018 03:11:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DFBD0863D4; Tue, 13 Mar 2018 03:11:02 +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 887591CF094 for ; Tue, 13 Mar 2018 03:11:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 84A7D2455B for ; Tue, 13 Mar 2018 03:11:01 +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 G7x-svt3ieGv for ; Tue, 13 Mar 2018 03:11:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by silver.osuosl.org (Postfix) with ESMTPS id 1BDAA227E8 for ; Tue, 13 Mar 2018 03:11:00 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id d206so13886002qkb.3 for ; Mon, 12 Mar 2018 20:11:00 -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=2ZAEOXVeZb0cUApUigJFY1VoQB+3SFEO8rIXf7Uq398=; b=Q5EK7qLYQLpTIj0q5EH2Tyo+i8QnFz5zqchfv0QiackqVgnpIt92/BIjacemp5hOKH CN1rvARmkvfnF7l9QPij3FeIt/x0mGxUl77bVU6MsoQ2F/Req2zgw03Vp86F7eAcyz9M vbp+369zGvOwortFB+kPXSu/RvoBUJLLY8LQaly2yc+gn/jhe5zBgY76rFb6CgFPFu49 IaDmsjGxSlJ/MxYQx5NMGdfgf4wCBcz3prL6qkWeRF6V8i7Gi6JAnNIkU8gRV16/oabM wWBPtghwYJpHh9L01jFwlBBmlyXVWeNH3oMgV44nzwiHbsW+UFzpeGfvNtTL5LSJ7zlS sGaQ== 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=2ZAEOXVeZb0cUApUigJFY1VoQB+3SFEO8rIXf7Uq398=; b=mFG86O3aRa9fwqeg57qjvyMAjyI5cSSN0Fs+YUu1JJBPUmm3aesTkrBlGVhjcHEpYN iONJADrrMzllz01weSBLXaxgpSxX0VUTklDB8Kk6CC2xc7sBJ67e1eyX4qKx635I8DRa Tk/j+SqSCNv621Je01NHs8fbfDx0bTqH2J1WwRDrC47uuB+j/1puGEsLWPzwt1l8SuTX 6f6ev9dL4Tjt4gZwu6BqyhWdPzzf4e4A1e4qpCL6iKTimFATKkZEvpXxUqkSfmXzNLgd qq8MJi9VtxTl2iL65nSuLHQd4jRu3KXVUkQd+Bnx0pyTaTo7L63SW/k8QDzfKM49BA4x dB6g== X-Gm-Message-State: AElRT7EJ0tiYPrs+A6BcUAt4PCqM8sh7dY+0HTNUhSxx4TUEd8UVtjtW BlFb+gA5X0IUTgEqJ/9Rzk1FtQ== X-Google-Smtp-Source: AG47ELtYO/5l8pqs/gv4DnTsc/NdITUhGki5rXFF7zUfGzC7Jy3D0JQgfdYmdpe2SG2byFH1MXSe9g== X-Received: by 10.55.33.144 with SMTP id f16mr15515413qki.158.1520910658783; Mon, 12 Mar 2018 20:10:58 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.10.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:10:58 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:39 -0300 Message-Id: <1520910585-19097-2-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 1/7] genrandconfig: fix code style X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix these warnings: E201 whitespace after '[' E202 whitespace before ']' E501 line too long (138 > 132 characters) -> isolate the common part of the external toolchain url in a variable to make the long lines shorter and more readable. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Thomas Petazzoni --- Changes v2 -> v3: - no changes Changes v1 -> v2: (suggested by Thomas Petazzoni) - fix the long lines instead of ignoring them Tested using this script: https://gitlab.com/RicardoMartincoski/buildroot/commit/19edfa388981e656216af7b8b566142161fa6142 --- utils/genrandconfig | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index 0d08570..d958664 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -127,7 +127,7 @@ def get_toolchain_configs(toolchains_csv, buildrootdir): with open(toolchains_csv) as r: # filter empty lines and comments - lines = [ t for t in r.readlines() if len(t.strip()) > 0 and t[0] != '#' ] + lines = [t for t in r.readlines() if len(t.strip()) > 0 and t[0] != '#'] toolchains = decode_byte_list(lines) configs = [] @@ -210,6 +210,8 @@ def fixup_config(configfile): with open(configfile) as configf: configlines = configf.readlines() + BR2_TOOLCHAIN_EXTERNAL_URL = 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/' + if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not sysinfo.has("java"): return False if "BR2_NEEDS_HOST_JAVAC=y\n" in configlines and not sysinfo.has("javac"): @@ -221,36 +223,36 @@ def fixup_config(configfile): return False # The ctng toolchain is affected by PR58854 if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: return False # The ctng toolchain tigger an assembler error with guile package when compiled with -Os (same issue as for CS ARM 2014.05-29) if 'BR2_PACKAGE_GUILE=y\n' in configlines and \ 'BR2_OPTIMIZE_S=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: return False # The ctng toolchain is affected by PR58854 if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/armv6-ctng-linux-uclibcgnueabi.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'armv6-ctng-linux-uclibcgnueabi.tar.xz"\n' in configlines: return False # The ctng toolchain is affected by PR58854 if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/armv7-ctng-linux-gnueabihf.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'armv7-ctng-linux-gnueabihf.tar.xz"\n' in configlines: return False # The ctng toolchain is affected by PR60155 if 'BR2_PACKAGE_SDL=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # The ctng toolchain is affected by PR60155 if 'BR2_PACKAGE_LIBMPEG2=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS toolchain uses eglibc-2.18 which lacks SYS_getdents64 if 'BR2_PACKAGE_STRONGSWAN=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: return False # This MIPS toolchain uses eglibc-2.18 which lacks SYS_getdents64 if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: return False # libffi not available on sh2a and ARMv7-M, but propagating libffi # arch dependencies in Buildroot is really too much work, so we @@ -266,37 +268,37 @@ def fixup_config(configfile): configlines.append('BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a10/hackberry.fex"\n') # This MIPS uClibc toolchain fails to build the gdb package if 'BR2_PACKAGE_GDB=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS uClibc toolchain fails to build the rt-tests package if 'BR2_PACKAGE_RT_TESTS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS uClibc toolchain fails to build the civetweb package if 'BR2_PACKAGE_CIVETWEB=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS ctng toolchain fails to build the python3 package if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: return False # This MIPS uClibc toolchain fails to build the strace package if 'BR2_PACKAGE_STRACE=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS uClibc toolchain fails to build the cdrkit package if 'BR2_PACKAGE_CDRKIT=y\n' in configlines and \ 'BR2_STATIC_LIBS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # uClibc vfork static linking issue if 'BR2_PACKAGE_ALSA_LIB=y\n' in configlines and \ 'BR2_STATIC_LIBS=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/i486-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'i486-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # This MIPS uClibc toolchain fails to build the weston package if 'BR2_PACKAGE_WESTON=y\n' in configlines and \ - 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: + BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: return False # The cs nios2 2017.02 toolchain is affected by binutils PR19405 if 'BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII=y\n' in configlines and \ From patchwork Tue Mar 13 03:09:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884974 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="SdytX2Dk"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fyQ6qk1z9sTC for ; Tue, 13 Mar 2018 14:11:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 55CCD889CF; Tue, 13 Mar 2018 03:11:24 +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 c8A4wTpJf36H; Tue, 13 Mar 2018 03:11:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AC0FD88852; Tue, 13 Mar 2018 03:11:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1A0EC1CF094 for ; Tue, 13 Mar 2018 03:11:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 174CF8688A for ; Tue, 13 Mar 2018 03:11:21 +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 3DMulwi-cxjp for ; Tue, 13 Mar 2018 03:11:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 39F5C8661F for ; Tue, 13 Mar 2018 03:11:20 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id z184so12364493qkc.1 for ; Mon, 12 Mar 2018 20:11:20 -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=IVFpa77RXNYjI2NSWLT4HNilKvJBaWdxtteOAsB6h6I=; b=SdytX2DkGSyIRoRSbUiucXnFcoEWQix7oACGh3C8JygMQ88wCjfziu4AXMNtqdqKXh UkzHIaDZyylgi4w4pw5Y3sXVORx21hzQNkZ4IciOrAuIcy5wV03q+qkpf8AjDMIRYj9y dhpKze3lQtdAGLYM/no55B+UPfBBnG2bEP5sUazZjaBG32PljvQ31s36KADU3qhacFoK +Hl0vwB8LvhRF+r/oB9sWDZG7Ud///53J/BGPWxtk6waaW53Aho+9KF6NuHpcCgQ6zeX wZS+4IRiRVA1zPMzLBsvO7q7edNixB2GB9/MRFyq6wanXSuXw+iS5zJWFb3Lm7NVilAt wOEQ== 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=IVFpa77RXNYjI2NSWLT4HNilKvJBaWdxtteOAsB6h6I=; b=YTUCDfTWtqwPLznkICUZErjxQlk6bVyLcNg3jxY0WjPijue3GWUF5AT40MQG3F6ji6 ojw4McCnSiMWvzx1nUTB+7jqq6wq1I7tenEUYX9KcJM9ZN1ORr/sxhCFMDUExWwTf1vn 8KuZ/Jr0bGC4uT1IHcR4RYXd4/A83djVXnkWjt1mHJ/XtqjY6fvbwdRE6j3q+FJ7vdf0 PuccwIpdm+f25Jpc28RJQtpKBEjSQWKvTIVwScUHSDHM48gvhFUyhkQCNus8tJcz4RWT KSaYLZbRIvAlR04BkVKyelN2u7OumhlT7ohO9pn3RXDYygrwNc5LKPCnn9cSa4sWWz7Z CPpw== X-Gm-Message-State: AElRT7G1aRN/deNYCucOgd+dnfCM/pygkU0OI6artSsQtojqcQIIzwyU k2EspKwyGLFeOFw2/DyGStXDSA== X-Google-Smtp-Source: AG47ELsa6LUZ1r3xQW+JF1j9Oe4LmAcnR7JzKurWhYerl02/yArIPVU432JiU0+AXHo+GG922o1AUw== X-Received: by 10.55.66.65 with SMTP id p62mr1520224qka.74.1520910677690; Mon, 12 Mar 2018 20:11:17 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.11.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:11:17 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:40 -0300 Message-Id: <1520910585-19097-3-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 2/7] size-stats-compare: fix code style X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Thomas De Schampheleire , Ricardo Martincoski , "Yann E . MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix these warnings: E129 visually indented line with same indent as next logical line E302 expected 2 blank lines, found 1 Signed-off-by: Ricardo Martincoski Cc: Thomas De Schampheleire Cc: Thomas Petazzoni Cc: Yann E. MORIN Reviewed-by: "Yann E. MORIN" --- Changes v2 -> v3: - manually accepted review tag Changes v1 -> v2: (suggested by Thomas Petazzoni) - the fix for E129 made the code less readable, use another fix. --- utils/size-stats-compare | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/size-stats-compare b/utils/size-stats-compare index e5a1ec3..a3d7f25 100755 --- a/utils/size-stats-compare +++ b/utils/size-stats-compare @@ -24,14 +24,15 @@ import csv import argparse import sys + def read_file_size_csv(inputf, detail=None): """Extract package or file sizes from CSV file into size dictionary""" sizes = {} reader = csv.reader(inputf) header = next(reader) - if (header[0] != 'File name' or header[1] != 'Package name' or - header[2] != 'File size' or header[3] != 'Package size'): + if header[0] != 'File name' or header[1] != 'Package name' or \ + header[2] != 'File size' or header[3] != 'Package size': print(("Input file %s does not contain the expected header. Are you " "sure this file corresponds to the file-size-stats.csv " "file created by 'make graph-size'?") % inputf.name) @@ -45,6 +46,7 @@ def read_file_size_csv(inputf, detail=None): return sizes + def compare_sizes(old, new): """Return delta/added/removed dictionaries based on two input size dictionaries""" @@ -64,6 +66,7 @@ def compare_sizes(old, new): return delta + def print_results(result, threshold): """Print the given result dictionary sorted by size, ignoring any entries below or equal to threshold""" From patchwork Tue Mar 13 03:09:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884975 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="ZbjX0xej"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fyh1pTdz9sT9 for ; Tue, 13 Mar 2018 14:11:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3E1B686CCD; Tue, 13 Mar 2018 03:11:37 +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 Iwg0tink5Muo; Tue, 13 Mar 2018 03:11:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 608F48688A; Tue, 13 Mar 2018 03:11:35 +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 08F101CF094 for ; Tue, 13 Mar 2018 03:11:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 05D7F2455B for ; Tue, 13 Mar 2018 03:11:34 +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 dy8Vb5XWUIb2 for ; Tue, 13 Mar 2018 03:11:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by silver.osuosl.org (Postfix) with ESMTPS id 0233323ACA for ; Tue, 13 Mar 2018 03:11:33 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id s9so1244391qke.12 for ; Mon, 12 Mar 2018 20:11:32 -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=KgtDppa5ZnOoqs4DF9906EOY12N9jhqRrxe96qPf1Ic=; b=ZbjX0xej7BX/EYgsifF6hNjNCQEHuOUTMvOFIjC5pKCE/MZgUf5RsDRRiazL4rckWe cBqvqVNDKDHwW/ej0zzzT4Evv583/zPqm7JVrfsNGGd47HSgFKxQ7RamAWvOg11N6/4x 1AzAQDgwb4q9OMMkWjF26PRTpB/rs/AE1hcKEp+BSWs0U93agOvrk7qjPGzwnQM+l2O7 DBrBj/6RS98/69PumDUniMf4sPa+EIMg8JyG7NPzOcW1MwHMFSIlkGNGKVmzDEu7pJIB SFOQJU5JjpvAvXYj7Jbt5L6AWxAc1pjOk3E3sXl9U9gwe/KNu2eUFS+dCZsvrlQlxbUp Ipqw== 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=KgtDppa5ZnOoqs4DF9906EOY12N9jhqRrxe96qPf1Ic=; b=gR8Ij9hbrI6QizFWMLppI09w+xiS5d5YhVd/TWZPGpCbz1ZzG9bLe8coiz0xy8TDBp T6Kpmckn0236k9Kf0Kse/1O69eA5D4DewaLuiXB+BjVfpOe5WaPyjyGd90PGnYtWdrsX RxaHIhKoF6UsIDp13JQlJsYCYyMexXzkCiHNCC0rrWIksYn7/bsyTp5fA22+DaeomHb6 bYQUJE5fVCGQyKymSJ5u9yY9816yr5w0NFzFvTqjDol4wxBJXMUlj4WoBc+X+vLXjEWK MdT1ODl2+v/QQ7RbtroQuqXJgXRROo8aA7c7WFSgiY6o2KsqX4q/EL1sa2NZWhMXEG6T vuww== X-Gm-Message-State: AElRT7FnTMmRSF5u+RnTLbz0w7kEYtXn5u7Gnpgb2KrHfaIeLVGtrvuw LXZ2cVfts3awyubA1/F8036ozw== X-Google-Smtp-Source: AG47ELs89T6ulluXCY0z+2uNY48R9HR0WKEyJoiSbS9QibyFteLqHpAYid1K8sd5u8XhIPTuuTSPTw== X-Received: by 10.55.51.206 with SMTP id z197mr14814779qkz.185.1520910691875; Mon, 12 Mar 2018 20:11:31 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.11.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:11:31 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:41 -0300 Message-Id: <1520910585-19097-4-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 3/7] test_python_cryptography: fix code style X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix these warnings: E122 continuation line missing indentation or outdented E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 F401 'os' imported but unused Signed-off-by: Ricardo Martincoski Cc: Yegor Yefremov Reviewed-by: Yegor Yefremov --- Changes v2 -> v3: - no changes Changes v1 -> v2: - new patch (v1 of this series was not sent yet during the review of http://patchwork.ozlabs.org/patch/811011/ so I asked to fix all in the same series. https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/57046960 https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/57046961 --- .../tests/package/test_python_cryptography.py | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/support/testing/tests/package/test_python_cryptography.py b/support/testing/tests/package/test_python_cryptography.py index b60152d..78c3ef5 100644 --- a/support/testing/tests/package/test_python_cryptography.py +++ b/support/testing/tests/package/test_python_cryptography.py @@ -1,7 +1,6 @@ -import os - from tests.package.test_python import TestPythonBase + class TestPythonCryptography(TestPythonBase): def fernet_test(self, timeout=-1): cmd = self.interpreter + " -c 'from cryptography.fernet import Fernet;" @@ -10,22 +9,26 @@ class TestPythonCryptography(TestPythonBase): _, exit_code = self.emulator.run(cmd, timeout) self.assertEqual(exit_code, 0) + class TestPythonPy2Cryptography(TestPythonCryptography): config = TestPythonBase.config + \ -""" -BR2_PACKAGE_PYTHON=y -BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y -""" + """ + BR2_PACKAGE_PYTHON=y + BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y + """ + def test_run(self): self.login() self.fernet_test(40) + class TestPythonPy3Cryptography(TestPythonCryptography): config = TestPythonBase.config + \ -""" -BR2_PACKAGE_PYTHON3=y -BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y -""" + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y + """ + def test_run(self): self.login() self.fernet_test(40) From patchwork Tue Mar 13 03:09:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884976 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="qSpc9akO"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fyv1jCJz9sTF for ; Tue, 13 Mar 2018 14:11:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D7EAD867A7; Tue, 13 Mar 2018 03:11:48 +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 QOkHmwv4m-JM; Tue, 13 Mar 2018 03:11:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 58ACD863D4; Tue, 13 Mar 2018 03:11:46 +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 A9CBD1CF094 for ; Tue, 13 Mar 2018 03:11:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A6B932455B for ; Tue, 13 Mar 2018 03:11:45 +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 j87P1njJYz4K for ; Tue, 13 Mar 2018 03:11:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by silver.osuosl.org (Postfix) with ESMTPS id D43ED23ACA for ; Tue, 13 Mar 2018 03:11:44 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id z197so13883754qkb.6 for ; Mon, 12 Mar 2018 20:11:44 -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=og/JugVCT/OkzSUdImgtnCknvhkBxGZg3XCaN7OnT6s=; b=qSpc9akOrv1udDtuW/MuUDAL/R9P569kYaQmMBE3xuhDdOj1Rnj1SAdT0ZGFiEHn0y t8cnvVp+mF9ClocpMPqrCOKyy61/NrlwG1e/pu4T4WiaK2ViIVR7zQ+0xRj/zgvs8dkX rkG+h7j2D3GAFHY9hHXo3qtLGqBXggAvOPSmQvsv5y8VsjBXjnuPjnxo6crSv/VmN8Dg O1bSpWVxQTtGS92U2pQLzFKgPV25mexS1bd46z0sZ+Zv+iGJylTgN/QmI7jxlpVMAw0E TEvILh8b4/PbCJy5WEURxfhgOOsQL4Kb0lzhQAKYgRvqKuHNqCYPz1JoBBsKlOMaJ46z thnQ== 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=og/JugVCT/OkzSUdImgtnCknvhkBxGZg3XCaN7OnT6s=; b=KgOpW1mzUNw1xbqiSP6WD7oefJJlUXlS31eCCxFKMLOd/qericriPNb4DzLcFoijo6 +kE0wha1rycZQfChb8OGjCN/TCYDy1Co2DSc/HZIlCoDyCPOxKgoQmWocjcETr56NH0v 3jRnCaFL2K+ILgt9Gl64oI42IbI5U1SQbPToD8W9GscoDVPXLcqyqAnObAwbr1OwozG/ TI46yfpG0xMSrlfM8oQYR0T9Ui52UehZCmiaxkE+7dLvgGQmd+jxQlmAz9RtNd5rm8fN bUS261okbc+L7Ber4ojbr/5/aLPFyAJFmqJXgDZwe0L18SVGZ3RiXHolT5AujDYFJbX/ KgRA== X-Gm-Message-State: AElRT7EKgoC+t4DzfV4FPWxkjMtANJV1AJa65L5HfY9P1IluOIzFHBnp p/Mw97UAXhCRdbZMsve+09WABA== X-Google-Smtp-Source: AG47ELuMhZhR8A5Egg+joOaIo179fpS8QQJ+er+EkenGbGFcjaWBhT05P9hS3kPMmux2axP9Z++9cQ== X-Received: by 10.55.195.216 with SMTP id r85mr6429018qkl.17.1520910703778; Mon, 12 Mar 2018 20:11:43 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:11:43 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:42 -0300 Message-Id: <1520910585-19097-5-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 4/7] scanpypi: fix code style X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix these warnings: E401 multiple imports on one line Signed-off-by: Ricardo Martincoski Cc: Yegor Yefremov Reviewed-by: Yegor Yefremov --- Changes v2 -> v3: - no changes Changes v1 -> v2: - new patch. --- utils/scanpypi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/scanpypi b/utils/scanpypi index b9006ee..505ba0a 100755 --- a/utils/scanpypi +++ b/utils/scanpypi @@ -10,7 +10,9 @@ from __future__ import print_function from __future__ import absolute_import import argparse import json -import six.moves.urllib.request, six.moves.urllib.error, six.moves.urllib.parse +import six.moves.urllib.request +import six.moves.urllib.error +import six.moves.urllib.parse import sys import os import shutil From patchwork Tue Mar 13 03:09:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884977 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.136; helo=silver.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="bpqlpTfM"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fzQ172Cz9sT9 for ; Tue, 13 Mar 2018 14:12:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4B3D525C1B; Tue, 13 Mar 2018 03:12:15 +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 7MGn508dCOGj; Tue, 13 Mar 2018 03:12:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 226352455B; Tue, 13 Mar 2018 03:12:14 +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 83FD61CF094 for ; Tue, 13 Mar 2018 03:12:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7F04E863D5 for ; Tue, 13 Mar 2018 03:12:12 +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 e2fur3QPb-JT for ; Tue, 13 Mar 2018 03:12:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9744B864EA for ; Tue, 13 Mar 2018 03:12:11 +0000 (UTC) Received: by mail-qk0-f194.google.com with SMTP id d206so13888002qkb.3 for ; Mon, 12 Mar 2018 20:12:11 -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=ujn0kib5PWmZ71ZeGUsgj2oAbMS0QjEWw/3gayH4yfs=; b=bpqlpTfMuGVTj+PVa/lr1JNHO+PEF9u2pfh8MWymLeidK9BS9gCcv5CLyHQFPyPat6 8r5FehtBuwKUTvA4JtOgFf5IS8QULXUMHMJICnEPVlZ9Yw/gZ7e0ZtXwGMZmclR4VqHK IPZojo+RRYoctNfYSNKWXYFtFQm0EoOajbHJwMvHCSxTjeLG/T7c1AwUoE/rWuqU3IEC Z1dmqZgsngYiPiqsy3uQ1/VyiU6DmC0bdahXzqsBB/INgXXPizZF1lbeStOYfJOGjNLQ WZEs7Tv78aGYczC2P1vArfsCWxwM8RlbMJr32qGj2XrKkKtAfdd7hNZLdCjPQlNfckX5 KE9g== 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=ujn0kib5PWmZ71ZeGUsgj2oAbMS0QjEWw/3gayH4yfs=; b=dakxZ5l503L/WD/J3C1W1Oz7UVvT2cVc3PihgNcsx4Tr5GCMQQNtDXdXB78+QW13us 4giAiBQNBtWq3gd8sxx6TeLPQinj44do6n5xhweGzxHsw6kK9C9RTErt+Xtbe17idRG2 hKKoYxMvTeNEv8TQ9Jkci/TXogNSKQs/HKJ6qH/6xJVa40N7cRx+U6/K6o2OUAqaT/wM 2Elq4fImifL85DNRa/0f8HCJwkeb9BMs6ILzirOSdVqopwmDkB5+RWuXG/Mc3sq6+jzI cmJNC8e9VcJxLpWmAE8dOSr9eM4U5iZeic00xkIRaQnPqkn16gTes+afpaddCDfsZeHV MziQ== X-Gm-Message-State: AElRT7HYGPyckb/oPa2qX8VfqpTzP7wRpmC54GzB4QwAC5bQtG6aw3if MH8p4SgADwh0hX0HQDoJupOlOQ== X-Google-Smtp-Source: AG47ELugR3hjnwkt2/x0DfaOimmp293deLroNVp+bVdAGgwYHE7sEMzPLOXWe7Sv5aADlNtZfQfMkA== X-Received: by 10.55.66.65 with SMTP id p62mr1522839qka.74.1520910730651; Mon, 12 Mar 2018 20:12:10 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.12.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:12:10 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:43 -0300 Message-Id: <1520910585-19097-6-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 5/7] support/dockerfile: install flake8 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Ricardo Martincoski , "Yann E . MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use the latest version of the tool because it is actively maintained. But use a fixed version of the tool and its dependencies to get stable results. It can be manually bumped from time to time. Before installing any Python packages, ensure pip, setuptools, and wheel are up to date as recommended in the docs [1]. [1] https://packaging.python.org/tutorials/installing-packages/ Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Peter Korsgaard Cc: Thomas Petazzoni Cc: Yann E. MORIN Acked-by: "Yann E. MORIN" --- Changes v2 -> v3: (suggested by Yann E. MORIN) - minimise the number of intermediate layers; - explain why install setuptools separately using the latest version (I actually just used the exact command line from the docs and referenced it in the commit log); - use a single package on each line, sorted. Changes v1 -> v2: (suggested by Yann E. MORIN) - install flake8 to the base docker image instead of adding sudo to install tools on the fly. --- support/docker/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile index ce3fdd9..f01ac25 100644 --- a/support/docker/Dockerfile +++ b/support/docker/Dockerfile @@ -27,10 +27,19 @@ RUN dpkg --add-architecture i386 && \ cvs bzr git mercurial subversion wget \ cpio unzip \ libncurses5-dev \ - python-nose2 python-pexpect qemu-system-arm qemu-system-x86 && \ + python-nose2 python-pexpect qemu-system-arm qemu-system-x86 \ + python-pip && \ apt-get -y autoremove && \ apt-get -y clean +# For check-flake8 +RUN python -m pip install --upgrade pip setuptools wheel && \ + pip install -q \ + flake8==3.5.0 \ + mccabe==0.6.1 \ + pycodestyle==2.3.1 \ + pyflakes==1.6.0 + # To be able to generate a toolchain with locales, enable one UTF-8 locale RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \ /usr/sbin/locale-gen From patchwork Tue Mar 13 03:09:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884978 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.136; helo=silver.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="eYrKp6Xm"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fzh0xDlz9sT9 for ; Tue, 13 Mar 2018 14:12:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 703A725DD1; Tue, 13 Mar 2018 03:12:30 +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 eOJLmVy2sAFj; Tue, 13 Mar 2018 03:12:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D9D8C2457C; Tue, 13 Mar 2018 03:12:28 +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 C14681CF094 for ; Tue, 13 Mar 2018 03:12:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BE09D864EA for ; Tue, 13 Mar 2018 03:12:27 +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 hkkoHEMkskWX for ; Tue, 13 Mar 2018 03:12:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id D7E3E863D5 for ; Tue, 13 Mar 2018 03:12:26 +0000 (UTC) Received: by mail-qt0-f193.google.com with SMTP id a23so21278710qtn.0 for ; Mon, 12 Mar 2018 20:12:26 -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=s78Xgif745b8PPXlv8vhc83WDk4Hl+YAJyGtsdIjsUM=; b=eYrKp6XmMkmrYtgDBCHZua9GGVAmGqfuv42q/uUrphJ1UONjGB/UDUq2soicVwf4JV e5rPWKfo6dRW90I6CXtzDAloJasNPdJRV2c6yqjDx/ggEL08Jn9dkuCRoHRZ4xIC68Ek 8BaB22EY5q7WDLHr6rqQr8hes2B6dcvSzCpZkGh+HwcZ0uA9JqLPJ0EqPHTPZJhAjzvp ZK7WEkAwwUkkBLW+Rq9UUbHkt+vrzhib+h5oDSGevokO2ULC8cvG8nwgvKt5PyWlOHlS x9NIvISLESyspkthPfyIVYA4da/8I30pTnqPMNqtOpggIv6w/oT9BsvVtCoK41v6a7xY Nfeg== 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=s78Xgif745b8PPXlv8vhc83WDk4Hl+YAJyGtsdIjsUM=; b=cNG8DEo6Fiw6re3K/VULrlbmgYLuRxJlwkZmRgyHVjn5gRZZFHImUj8TlwuBDxcc8U cwKQSmB8av3g0+rXRpNGvihuGUpclPiqZTka4ozkb64skktbRxbCBy1XTIrZK1O7Gboi XbDnYkBrH6pOeXGK57H18pCqZayzeiT9wJYt5tDjobLnGT81TjE4aDk3i4NjCERCDZK1 Y3ByrYPFP1sNdKTjhHprPCrPjCLNoDriWMM8G2xolD2klZXWXIaOa3O58p1H7aCFAvij p20F+w7FilsM1p7uMAMJpq/0HuN7XNYhmSQnjAjinYnlopwJzp2k2AD6j8aEKlwTfzMI 0Zog== X-Gm-Message-State: AElRT7FZyOMySu/iieSeh71RYk6QS/ZcmmGMPJcDa6YBShHAtUPg5Ia1 ddvxVLXjLBU8dtIyz3HfjA20GQ== X-Google-Smtp-Source: AG47ELsJS0bXVebc1utCmTBMfXvaHZk2CjzNnreST4fvXB3QN74cMS8JPnjRilzM4wwU4zDClp7vow== X-Received: by 10.200.1.83 with SMTP id f19mr15466433qtg.177.1520910745678; Mon, 12 Mar 2018 20:12:25 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.12.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:12:25 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:44 -0300 Message-Id: <1520910585-19097-7-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 6/7] .gitlab-ci.yml: check flake8 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a test to check Python code style in the whole buildroot tree. Search files by type in order to help flake8 to find the Python scripts without .py extension. But don't rely only in the output of 'file' as it uses heuristics and sometimes it is wrong (specially identifying Python files as C++ source for the 'file' version currently in the Docker image). Include in the output: - the list of Python files processed; - statistics for each kind of warning; - the total number of warnings; - the number of Python files processed. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Yann E. MORIN Reviewed-by: "Yann E. MORIN" --- BEFORE APPLYING, see this note from Yann: Note: this can only be applied _after_ we regenerate the docker image. Then we'll have to update the version of the image at the top of the gitlab-ci.yml file. Changes v2 -> v3: - manually accepted review tag Changes v1 -> v2: (suggested by Yann E. MORIN) - install flake8 to the base docker image (in the previous patch) https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/57046920 --- .gitlab-ci.yml | 11 +++++++++++ .gitlab-ci.yml.in | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f44c3a9..9ad4c5f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,17 @@ check-DEVELOPERS: script: - "! utils/get-developers | grep -v 'No action specified'" +check-flake8: + before_script: + # Help flake8 to find the Python files without .py extension. + - find * -type f -name '*.py' > files.txt + - find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt + - sort -u files.txt | tee files.processed + script: + - python -m flake8 --statistics --count $(cat files.processed) + after_script: + - wc -l files.processed + check-package: script: - find . -type f \( -name '*.mk' -o -name '*.hash' \) -exec ./utils/check-package {} + diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in index cb3eb71..95fc025 100644 --- a/.gitlab-ci.yml.in +++ b/.gitlab-ci.yml.in @@ -30,6 +30,17 @@ check-DEVELOPERS: script: - "! utils/get-developers | grep -v 'No action specified'" +check-flake8: + before_script: + # Help flake8 to find the Python files without .py extension. + - find * -type f -name '*.py' > files.txt + - find * -type f -print0 | xargs -0 file | grep 'Python script' | cut -d':' -f1 >> files.txt + - sort -u files.txt | tee files.processed + script: + - python -m flake8 --statistics --count $(cat files.processed) + after_script: + - wc -l files.processed + check-package: script: - find . -type f \( -name '*.mk' -o -name '*.hash' \) -exec ./utils/check-package {} + From patchwork Tue Mar 13 03:09:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 884979 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="dX/8fIaM"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400fzs6Kd7z9sT9 for ; Tue, 13 Mar 2018 14:12:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E425A88852; Tue, 13 Mar 2018 03:12:38 +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 GYRFpc-hzP1p; Tue, 13 Mar 2018 03:12:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9ABAF887E2; Tue, 13 Mar 2018 03:12:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 66EDD1CF094 for ; Tue, 13 Mar 2018 03:12:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 643228688A for ; Tue, 13 Mar 2018 03:12:36 +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 37SaKgscCKyK for ; Tue, 13 Mar 2018 03:12:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B69F78661F for ; Tue, 13 Mar 2018 03:12:35 +0000 (UTC) Received: by mail-qt0-f196.google.com with SMTP id n12so21252232qtl.5 for ; Mon, 12 Mar 2018 20:12:35 -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=u9uWGH9q+jKX1fTKolxZO7tY1js0okzt4x9LwGjp0+4=; b=dX/8fIaMhm9dmjuIszXNcScZJCyBJFKjbOdDIH5CWSwYZhNLuzWTcWFnrwf+d6zhqU SEHF4B8ynIdMdlzAYkd3wWSia/dlMNUzP1ozKUrJpEalsaC1q94z2Hm5AtEAvqEIup2J XLy2B4xJDKD9kOkKl3j3gx95j12Bb++Tuvi+Y4x5iNqnbOV2uuBbGiNhCTTVYoBgvXlX iWn8ziA4dmwm8Ys1Gb2qIeKfBKW0kYbLzRgl5JajZQ6JxYpL3steJvjuIf54aKp9BfXC pVnHkBhbeYS2S+pZsf/b5rAKoy3/oArpOo5MWL8ZIYoehBH611DhwwmG1NoQwWz27zLa d2tQ== 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=u9uWGH9q+jKX1fTKolxZO7tY1js0okzt4x9LwGjp0+4=; b=bCofr2A1vr5g+6FIxr5e/XYYAvU15T2gT8kBW8+Z1ZesT9ZgK8f7EazTwyCzTNmchd pPOpNdTwMqGTBirL7njo/w2et5dbULwXlo0B+1Scd+KTZ0Cp/fwARh84ICQ0IndEOMMj Z+icINNOnTSuFRAuctzyIVAkiI2Gekh9u39Z634k2kQwY5fqGRCO84vTMJiRexuuyvUU Thj382i8+CBXIVvv1fZKJPQPEpyvlHTFtta/EkRycq23V46Ut1nPnUAQdR5yK/GY6p8n pw4+Zh3AbdwerKMOHk1p3TI+zwPpC9PMXDhP9HinVuIm2Bd+fEUoHMFKa58qvdeNlue+ 9cGQ== X-Gm-Message-State: AElRT7E5SXvxUI3VtcdaPvLHkn6pkNXax/shWWJu7wyqb2B1mEBg+Tk+ WoThO7p+sG65PZE/u2RCIFOXdg== X-Google-Smtp-Source: AG47ELv0TIi8flxNMJzRI0Bg1HEMfp2gst/wW2hoPMQJa/ej/J7jvQ/f9UwLikdEgVobFQYlnwQtZg== X-Received: by 10.237.52.3 with SMTP id w3mr15555879qtd.62.1520910754703; Mon, 12 Mar 2018 20:12:34 -0700 (PDT) Received: from ultri3.home (189.27.182.92.dynamic.adsl.gvt.net.br. [189.27.182.92]) by smtp.gmail.com with ESMTPSA id t186sm3910098qkh.74.2018.03.12.20.12.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 20:12:34 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Tue, 13 Mar 2018 00:09:45 -0300 Message-Id: <1520910585-19097-8-git-send-email-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> References: <1520910585-19097-1-git-send-email-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v3 7/7] .flake8: ignore utils/diffconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcus Folkesson , Thomas Petazzoni , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This script comes from the kernel source, so ignore any code style warnings for it in order to keep it as close as possible to the original one, making synchronization between repos easier. The option --exclude for flake8/pycodestyle is an absolute list and has a default, so ideally the default values should be added too. But the use cases for flake8 in the tree are: - when developing a new script or changing an existing one, the developer calls flake8 only on that script; - in the GitLab job, a list of all Python files to be tested is created and then passed to flake8. None of these involve calling 'flake8' without parameters, so don't care about adding the default value. Signed-off-by: Ricardo Martincoski Cc: Marcus Folkesson Cc: Thomas Petazzoni --- Changes v2 -> v3: - no changes Changes v1 -> v2: - instead of tweaking even more the script from the kernel source, ignore any warnings for it; (suggested by Thomas Petazzoni) - move the patch after the one adding the GitLab job so I can reference it in the commit message. --- .flake8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.flake8 b/.flake8 index afdb967..7dd7b54 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,5 @@ [flake8] +exclude= + # copied from the kernel sources + utils/diffconfig max-line-length=132