From patchwork Sat Aug 17 17:18:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1148741 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=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sgC2WVd+"; 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 469n375snYz9sMr for ; Sun, 18 Aug 2019 03:18:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F183B859E3; Sat, 17 Aug 2019 17:18:38 +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 8QtL4H_Thqnx; Sat, 17 Aug 2019 17:18:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5046F85992; Sat, 17 Aug 2019 17:18:38 +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 5DB691BF402 for ; Sat, 17 Aug 2019 17:18:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 555F185992 for ; Sat, 17 Aug 2019 17:18: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 9bszE3ADV1vE for ; Sat, 17 Aug 2019 17:18:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 100388598E for ; Sat, 17 Aug 2019 17:18:35 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id 10so6464353wmp.3 for ; Sat, 17 Aug 2019 10:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=huxeVHSjiU5SAMEs9oXuY8NAkNTjIEbLKQCV52B9R1M=; b=sgC2WVd+CYOuFypj85SCWZIKLtwGrNgJg92pLSNUXjG8zbzu8VxNGfFYXxdWBEIEwl mVKqolR5oah3GnW17VFhcCUrDQuLdVkBPX+o1ytQYBPeQqOHcle613lqHzztaBGYTouT ljMQp0fKhUGZAu8lG2jLTldcIrHLsklCDSo2iltpRxsLr55UEAYuNWdpBFqjNIeWc01l nXyGd1AqEUgi1alv177FklqO+FI77zpk3ZiXcRAuyIuvl/PMplMGUV7MmuXCH6ljCCZv DFXgMybvMMV6vJCNfbnuFDmzNNBVsFQbtJ61wow0Wzp1SN+3+zKa6/Fdx70CSSm3MlCh nuIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=huxeVHSjiU5SAMEs9oXuY8NAkNTjIEbLKQCV52B9R1M=; b=ib2qosi2kLvHPe9u8P+8z6Qm30ufqdXy6awCYzmnKNrUJDj1fXEqbbBCOQj9VPxrJH SCxIxw3uAT2Hc1ysJ4xq7GT28ZpNVkpLb8KppBMnrVeObvaereDruBQUhk3gT6k37SX7 txsAo30iU+auoaE9bA4CmaJuaOeUYmcTJXJjxeU4cY/kBRlz+/B6Vy5vAG4B4PKCRDcM LnQ80TWk/XPtzlUhs21XeTnFt7wlEfpiXFj6CGzh3Os4dDDduJxEXgLHf3jhmrFATtWn MX4V54UI/Goz8wI4UzgHSWjKF/S8FO/XIYACNYu3hce1RJWBFD1BbWEXjkUon1W4cqKV RQ+w== X-Gm-Message-State: APjAAAXO7N3rBEYn4rjo50PnVEg00Uu1m6aeOT5NUIiF3yfy0rZlszoU ezXrx8HtibuSC3S4dBSeSaBTazlW X-Google-Smtp-Source: APXvYqw3xJlgWavitaaQ1X5sVPL+MuA90oClObWw7w/Day3H9t2TGAV1EJ+V7yBPlDMNRRdJgzzYjg== X-Received: by 2002:a1c:c542:: with SMTP id v63mr12047874wmf.97.1566062313153; Sat, 17 Aug 2019 10:18:33 -0700 (PDT) Received: from localhost.localdomain (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w13sm20864877wre.44.2019.08.17.10.18.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Aug 2019 10:18:32 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 17 Aug 2019 19:18:22 +0200 Message-Id: <831c11fcb0c77b1d1d0692469a66d664ca9d65a4.1566062299.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/9] support/graph-size: fix flake8 warnings 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: Thomas De Schampheleire , "Yann E. MORIN" , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" There are three E501 warnings returned by flake8, when run locally, because we enforce a local 80-char limit, but that are not reported by the gitlab-ci jobs because only a 132-char limit is required there. Signed-off-by: Yann E. MORIN Cc: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Thomas De Schampheleire Reviewed-by: Ricardo Martincoski --- I initially whined loudly when this discrepancy was added, but now I can prove that it is bad: running flake8 on a locally-modified script will return errors that have not been introduced by the developer, but by a previous change by someone else that was not careful to run flake8 on it... Sigh... :-( --- support/scripts/size-stats | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/support/scripts/size-stats b/support/scripts/size-stats index deea92e278..8dfa391e24 100755 --- a/support/scripts/size-stats +++ b/support/scripts/size-stats @@ -66,8 +66,8 @@ def add_file(filesdict, relpath, abspath, pkg): # def build_package_dict(builddir): filesdict = {} - with open(os.path.join(builddir, "build", "packages-file-list.txt")) as filelistf: - for l in filelistf.readlines(): + with open(os.path.join(builddir, "build", "packages-file-list.txt")) as f: + for l in f.readlines(): pkg, fpath = l.split(",", 1) # remove the initial './' in each file path fpath = fpath.strip()[2:] @@ -151,7 +151,8 @@ def draw_graph(pkgsize, outputf): plt.setp(texts, fontproperties=proptease) plt.suptitle("Filesystem size per package", fontsize=18, y=.97) - plt.title("Total filesystem size: %d kB" % (total / 1000.), fontsize=10, y=.96) + plt.title("Total filesystem size: %d kB" % (total / 1000.), fontsize=10, + y=.96) plt.savefig(outputf) @@ -209,7 +210,8 @@ def gen_packages_csv(pkgsizes, outputf): total = sum(pkgsizes.values()) with open(outputf, 'w') as csvfile: wr = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) - wr.writerow(["Package name", "Package size", "Package size in system (%)"]) + wr.writerow(["Package name", "Package size", + "Package size in system (%)"]) for (pkg, size) in pkgsizes.items(): wr.writerow([pkg, size, "%.1f" % (float(size) / total * 100)])