From patchwork Sun May 31 20:42:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1301512 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.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.a=rsa-sha256 header.s=20161025 header.b=qDmi4oQY; 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 49ZqyF1GDLz9sPK for ; Mon, 1 Jun 2020 06:43:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B22988670F; Sun, 31 May 2020 20:43: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 vvy4WOcCtQJT; Sun, 31 May 2020 20:43:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 98CCC8679A; Sun, 31 May 2020 20:43:10 +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 F33EA1BF3D6 for ; Sun, 31 May 2020 20:43:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id EF7428584A for ; Sun, 31 May 2020 20:43:08 +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 Q0s232G5jNhn for ; Sun, 31 May 2020 20:43:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 98F0F857D1 for ; Sun, 31 May 2020 20:43:06 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id j10so9438830wrw.8 for ; Sun, 31 May 2020 13:43:06 -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:mime-version :content-transfer-encoding; bh=LSmuAJ5FhvA4a/4DtN+kPMmKmD8xfemhz7LmB4IpYNs=; b=qDmi4oQY6eZXOEV6C8S5PQqFKBgmn6lFQO7JnDw1XjyL8H/R9U93zx2Hnq9NyjmV4P /JubDwNgMMijOuZS4x2UjC84xak4VBwRL06HrNugrCNoBlRYy7LyeEjP6lyyBzx/p9jh KGAwZQZouMFiv7/4Fao3xuVFmCZmkr1kc94xS3U9l4LDDqtu2mOJcpAJviNYnXxK87+p wr8dewFEJupLQi7LPJR9YsXeeuPGodSw/wQF9YEBPg/uDCD3g2wGMzaeqj1nmOwbNTpa j1wHLJK3Tol8HlrbNB+JF7GwwGA1jbkyQ0ZLVqbUQXINGITEcD0o/cssHPy9VyOncoOy U9AQ== 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:mime-version :content-transfer-encoding; bh=LSmuAJ5FhvA4a/4DtN+kPMmKmD8xfemhz7LmB4IpYNs=; b=Nn252TULMJoy6CrLkaXOyopDrKvWnIgJNnB7W6B1Cb7nQfWWUsPpQMOvi0DG1806bj gZkFpzuMsQHzzVThkAkeWUQ40ARd9QDBYgMDKLyHnwelUwLErwVUNCVil/WGKAt9ixWi 65xDIPoaYW6VLFxHb29BRGl37M9TT4GDoXZqm9TZCNt+PwffLkUJHwlazCXIF3uTCyVo JB62tEhBeMgxSXhU1kPOV3ZwY4pAoQqu5hPGr4PJe1CGlpewY7bdwutXKrkIihGIQhpV IdGh6ghyjmHz2XvE1SB4+G/NqHPgHTfdw69SqHQDZEe6zZM3wKYZbcD+23FvJL4/2QSL duiw== X-Gm-Message-State: AOAM530sHY0P3DFNGoz/ssUczf1ak0Fgmxw8qMu49sVvsdjaMzmJ7DXK CncesIH/1YtDX3cKcAd4Zmv3yW7Y X-Google-Smtp-Source: ABdhPJyZKKqAIABjdiuDgH9ipQjw8nQqRGdvI8tRYPL2p4p4oHN2ke9ml2qucv9SqrYJpYanxDTJvg== X-Received: by 2002:adf:fd48:: with SMTP id h8mr19948729wrs.226.1590957784688; Sun, 31 May 2020 13:43:04 -0700 (PDT) Received: from t450s.fritz.box (ip5b426f84.dynamic.kabel-deutschland.de. [91.66.111.132]) by smtp.gmail.com with ESMTPSA id o8sm8772510wmb.20.2020.05.31.13.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 13:43:04 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Sun, 31 May 2020 22:42:31 +0200 Message-Id: <20200531204233.31866-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] utils/check-package: add a check for the new spacing convention 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 , "Yann E . MORIN" , Ricardo Martincoski Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The seperation of the fields in the hash file should be 2 spaces for consistency. Signed-off-by: Heiko Thiery Cc: Yann E. MORIN --- utils/checkpackagelib/lib_hash.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py index 3e381119a5..a82ef23fe7 100644 --- a/utils/checkpackagelib/lib_hash.py +++ b/utils/checkpackagelib/lib_hash.py @@ -40,7 +40,7 @@ class HashType(_CheckFunction): if len(fields) < 2: return - htype, hexa = fields[:2] + htype, hexa, filename = fields[:3] if htype == "none": return if htype not in self.len_of_hash.keys(): @@ -53,3 +53,7 @@ class HashType(_CheckFunction): .format(self.filename, lineno, self.url_to_manual), text, "expected {} hex digits".format(self.len_of_hash[htype])] + if not re.match("^{} {} {}.*$".format(htype, hexa, filename), text): + return ["{}:{}: separation does not match expectation " + "({}#adding-packages-hash)" + .format(self.filename, lineno, self.url_to_manual), text]