From patchwork Fri Jan 3 15:18:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1217355 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.b="AuveAEkE"; 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 47q7q50gXvz9sR0 for ; Sat, 4 Jan 2020 02:19:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C058685F83; Fri, 3 Jan 2020 15:19: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 KaIqVcNl5zDv; Fri, 3 Jan 2020 15:19:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B17A85F60; Fri, 3 Jan 2020 15:19: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 797141BF599 for ; Fri, 3 Jan 2020 15:19:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7674286970 for ; Fri, 3 Jan 2020 15:19:01 +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 PO1r3M2w5l7S for ; Fri, 3 Jan 2020 15:19:00 +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 whitealder.osuosl.org (Postfix) with ESMTPS id CF7EC836F1 for ; Fri, 3 Jan 2020 15:18:59 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id p9so8689315wmc.2 for ; Fri, 03 Jan 2020 07:18:59 -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=Jl4DbhcXMR88UyaonTLuwNDvY1eCJwiG9aY4cm5EN8w=; b=AuveAEkE/wzYQ2NGYpmIN+8CjzXZSVLxLD5O6xcNmeD5Ur7b9BaVl1scDQaQwzqa1B 7Rn/d0c/iP7DdAYth9kTwGvAASXKoltCMB1GHK2lTbWOSHYKrx06eB3Xrd5PO5hBDisx UHJJnnu1YFvS/AWX01dQnyj3h2FkZL4fjKswGN7LuVy38cV6cexOVu+uV5AZ2qCFtOuo 82vpZQhSpDJOrKrqONpVk7ft1OxA9Xw/S7zXi06dZDgmlrpWOtV5R4uMoGwoFHTXH3QY HdmF35tFD5vRMIPEmALjstWmrYpHnH0SkdLR2ehnZ4UQP74hftVfudxxUjHy63/Hyt3a X2jw== 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=Jl4DbhcXMR88UyaonTLuwNDvY1eCJwiG9aY4cm5EN8w=; b=UUoyK60D1tWuFDl8b8Jpx7tpn4WIkCtPY3msOgH6Th/RqODgi91T3u/RY3iQylYsij nECiW2LGmhi6Vo2NUTiF6ce1MJfI8Irf0Rlng7TQhDqUqE0yyXJthz5OV0ZZ84SZHtky ZGqyVnV1Zi3Q49hh4ubfm36OYhLLKKBHM6ImmSGfun3kyMn7wF9EiXl/MROHjuEkSVsP m0nMW0wYPxNyvOXifvAjQUQvjvgsMcd/ylPp832BOU6IAUmMxRVkO+WmsnRMGVJsdiL6 0dLbs9Zlu/atf9DOXbLN4OQmZlUXriaPTIm4dYFdkcnh0BT9MSqkrcwaTasjbjTNbUC0 pD4Q== X-Gm-Message-State: APjAAAWgd3yx5pZgjsQH1HHzmHIzK8GHxT5/V2oDrnOM9O2OLoY7xeIy nueaENYjD03JpSIVDuB7507czQ// X-Google-Smtp-Source: APXvYqwiKgLAZ3dB3EPxCIh+JqPgYiABAJlVP2AK3RM23SD/cF4YuC+C2oYK6BQBlc0s+uJJtmQnPA== X-Received: by 2002:a7b:c183:: with SMTP id y3mr20577746wmi.0.1578064738085; Fri, 03 Jan 2020 07:18:58 -0800 (PST) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id u16sm12460565wmj.41.2020.01.03.07.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2020 07:18:57 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Fri, 3 Jan 2020 16:18:39 +0100 Message-Id: <20200103151849.10956-3-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200103151849.10956-1-heiko.thiery@gmail.com> References: <20200103151849.10956-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 02/11] support/scripts/pkg-stats: store pkg dir path 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use this value where it make sense. Signed-off-by: Heiko Thiery --- support/scripts/pkg-stats | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index 8c64993aaf..9cfbcf1acc 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -51,6 +51,7 @@ class Package: def __init__(self, name, path): self.name = name self.path = path + self.pkg_path = os.path.dirname(path) self.infras = None self.has_license = False self.has_license_files = False @@ -71,9 +72,9 @@ class Package: Fills in the .url field """ self.url_status = "No Config.in" - for filename in os.listdir(os.path.dirname(self.path)): + for filename in os.listdir(self.pkg_path): if fnmatch.fnmatch(filename, 'Config.*'): - fp = open(os.path.join(os.path.dirname(self.path), filename), "r") + fp = open(os.path.join(self.pkg_path, filename), "r") for config_line in fp: if URL_RE.match(config_line): self.url = config_line.strip() @@ -88,7 +89,7 @@ class Package: Fills in the .infras field """ self.infras = list() - with open(self.path, 'r') as f: + with open(os.path.join(self.pkg_path, self.name + '.mk'), 'r') as f: lines = f.readlines() for l in lines: match = INFRA_RE.match(l) @@ -139,8 +140,7 @@ class Package: Fills in the .warnings field """ cmd = ["./utils/check-package"] - pkgdir = os.path.dirname(self.path) - for root, dirs, files in os.walk(pkgdir): + for root, dirs, files in os.walk(self.pkg_path): for f in files: if f.endswith(".mk") or f.endswith(".hash") or f == "Config.in" or f == "Config.in.host": cmd.append(os.path.join(root, f)) @@ -732,6 +732,8 @@ def __main__(): 'HEAD']).splitlines()[0] print("Build package list ...") packages = get_pkglist(args.npackages, package_list) + print("Getting developers...") + developers = parse_developers() print("Getting package make info ...") package_init_make_info() print("Getting package details ...")