From patchwork Mon Mar 2 14:50:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1247694 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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.a=rsa-sha256 header.s=20161025 header.b=kUR84dB9; 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 48WNPn5zF1z9sRN for ; Tue, 3 Mar 2020 01:51:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9C55385B0A; Mon, 2 Mar 2020 14:51:23 +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 LzYLSgQJZ3Sm; Mon, 2 Mar 2020 14:51:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A201285A74; Mon, 2 Mar 2020 14:51:20 +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 E2B7F1BF39F for ; Mon, 2 Mar 2020 14:51:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8BDCF8589C for ; Mon, 2 Mar 2020 14:51:11 +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 cNwj-A5I8lmC for ; Mon, 2 Mar 2020 14:51:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BB99E85660 for ; Mon, 2 Mar 2020 14:50:37 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id p9so11534503wmc.2 for ; Mon, 02 Mar 2020 06:50:37 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=u3Zemj8dFbRO5aW65oOhJKFaOpWIfZZTFufonP6rFZo=; b=kUR84dB9o/bjlKd1KIhMsHJEv8w4TrAMjrAHDVN+tWH4QU9YSykmprhoCeun9fiO+e D7nMEBKkRm+1EMVhbxdYxLMWZHG9r6ffkNr/sxe1FfAf7mYgqLv3IOIP4mikPTGbnZ1i WDRk7E9ofof9gxzCAvTpWkvI+1nKm6poHxr+/Kx+cUHKfvGQGGpH2qTGPq64OaL3Esl0 dlCX/pMsIJO4dxjJ/hZ11g2lPNJhhY0ou5aDvZ3IVbl6R94vLRCDXz9gf2QKdYUBrsVw ZnPQGsZxsF1lP8e8G3Ny8xWjArRtptf7EcPdCD7BFNVosMpTpUcdbMzhnZ3s4cRfDjiL WBxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u3Zemj8dFbRO5aW65oOhJKFaOpWIfZZTFufonP6rFZo=; b=YRAzB/c5HSq7juEl22TRCUAhEXtGYJcnQsAPcVCXqFNR+6f+lRmSBKmqXXmxozrebV FV4VMlq779NhMHqTBshiwOG+EC2nLL9sS1L1rplg10jVhMpyXbbBmnvSMylRPJVVTGUX s8laa+AWnMxEQTcYDOe2PiyboF86z+XuxT8LX/PwqJ3L0Se+eVm8i/vBymnYxlRaK9Ah N/n8DTJvxsYcAKxYcDiat8yfGQ4a17zRgeWWA8P5b/FVB8LfhrDENfbNGKsDE8D33VJU rDVxNGw6Q3MnJcLN8NPKDxUZC/2ciJamCpg3Y9fYN1VxVhpVmQNIpUWSl/2NlxATLvlC CiJg== X-Gm-Message-State: APjAAAWjB97XsJr04OwzdoRForBU/zCnkQrS0ertCDUsc3J8V7OiXCXK mmSLa2oUvGUwU1rzzYfvmNoJPWBb X-Google-Smtp-Source: APXvYqzW2urb8SStu8JYcY2V/n5qqxO5FvoL4dprdZMbdWi8YHB+WoXGt8QPxGowqQFev1O7St5GLQ== X-Received: by 2002:a1c:688a:: with SMTP id d132mr19040479wmc.80.1583160635978; Mon, 02 Mar 2020 06:50:35 -0800 (PST) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id h17sm29648355wro.52.2020.03.02.06.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2020 06:50:35 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Mon, 2 Mar 2020 15:50:04 +0100 Message-Id: <20200302145013.9574-3-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200302145013.9574-1-heiko.thiery@gmail.com> References: <20200302145013.9574-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 02/12] support/scripts/pkg-stats: store patch files for the 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: Heiko Thiery , Thomas Petazzoni , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Remove the patch_count attribute and use a class property instead. Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 727b203032..4116622c98 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -64,7 +64,7 @@ class Package: self.has_license = False self.has_license_files = False self.has_hash = False - self.patch_count = 0 + self.patch_files = [] self.warnings = 0 self.current_version = None self.url = None @@ -93,6 +93,10 @@ class Package: self.url_status = "Missing" fp.close() + @property + def patch_count(self): + return len(self.patch_files) + def set_infra(self): """ Fills in the .infras field @@ -131,10 +135,9 @@ class Package: """ Fills in the .patch_count field """ - self.patch_count = 0 pkgdir = os.path.dirname(self.path) for subdir, _, _ in os.walk(pkgdir): - self.patch_count += len(fnmatch.filter(os.listdir(subdir), '*.patch')) + self.patch_files = fnmatch.filter(os.listdir(subdir), '*.patch') def set_current_version(self): """