From patchwork Wed Feb 5 21:22:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1234015 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.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.a=rsa-sha256 header.s=20161025 header.b=ar0p2Jvm; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48CZKH6sg6z9sPK for ; Thu, 6 Feb 2020 08:22:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 49B568796C; Wed, 5 Feb 2020 21:22:39 +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 SrN3sDEXLUR5; Wed, 5 Feb 2020 21:22:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E7A5879EF; Wed, 5 Feb 2020 21:22:37 +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 672D01BF28B for ; Wed, 5 Feb 2020 21:22:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 63DB7864FB for ; Wed, 5 Feb 2020 21:22:36 +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 zaJd4RR7oBqI for ; Wed, 5 Feb 2020 21:22:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8212A86447 for ; Wed, 5 Feb 2020 21:22:35 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id z7so4541511wrl.13 for ; Wed, 05 Feb 2020 13:22:35 -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:mime-version :content-transfer-encoding; bh=tV1SiThWukitjQDDD/4N8H09mvbfkylwtV6WcRbuHYI=; b=ar0p2JvmhUcT4vs8xiU6ymStVyKxvLb7hkea6lAqIYJH/ooPgST0ZE41g5ZP6/q5zk w1/RGzUy7CMVmcK8gsuXzQcg4urXLIT+D6D91hCUq+R9SRaq9lOWU2B4AznA7lMLmZhf /Y63cOOWCB9Gi69siZftC0J1hmrXvW0fKkLAlmLlRai5koyT8xZBdDdIpNXIfDHV7Te+ rBbiRrKE1CKkr8xHZbdyhM2OSAmmLcaWfr1IWR2ZSYEOJXLvmAe2UhCEj+QVL6CbvFbp 7M5Ydg1zk+/+yno/7dF4ZPdFSejAt1fWSiB1Q2AqmvvI70r2rDhM0k//kNvxIulyo0Xi HILQ== 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=tV1SiThWukitjQDDD/4N8H09mvbfkylwtV6WcRbuHYI=; b=oVOBemmrVNzjyIUwFlpuuIkusc1p8PSjUxBfaeYWwuElMgiE/MtmGXfHYxJk1a2uXz oRvjm+lHhJzg2S+QdGnE2N1pmk3V1Fo5svjcLX84s/O48qq2GaLUNtgk5VJGBUgH69QE hHvhoQCK/tld5wHG8zvs56kx9tauTwpz/lvOyFu7BjtBXArY2epQBzFIfptE6i2Ps0N/ FzeuXj3e061m5RKh3u8EORGGLhy0F/qa2gPZUjUfAKN5MiFnrqJUKHIhYoGcAumeOX5a ly9fiK+jwUGlmowW3o1kWmgU3Fdk9XA2PAiVBr3vdjQj7pmMV1MKWQ2AJMfGOMtn85dU xdPA== X-Gm-Message-State: APjAAAW0vFAnqRI4/p76x6DCInQDh5lrrVsFQCJBakpiNwIPBAERoTRD epyIgnNecTzXVPONwzXc02LKk+YL X-Google-Smtp-Source: APXvYqxTypjiHNnc5h9OX/SRFj4LC1fNmBy+eQ31TWEsgvGEbUk1zphaEIFHNXGpZWQAEbAPjJ2bRg== X-Received: by 2002:a5d:5347:: with SMTP id t7mr459497wrv.401.1580937753568; Wed, 05 Feb 2020 13:22:33 -0800 (PST) Received: from t450s.fritz.box (ip5f589927.dynamic.kabel-deutschland.de. [95.88.153.39]) by smtp.gmail.com with ESMTPSA id y20sm991136wmi.23.2020.02.05.13.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 13:22:32 -0800 (PST) From: Heiko Thiery To: buildroot@buildroot.org Date: Wed, 5 Feb 2020 22:22:12 +0100 Message-Id: <20200205212211.29720-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 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" 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 --- utils/checkpackagelib/lib_hash.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py index 3e381119a5..87cc58a1bb 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,8 @@ 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(re.escape("^{} {} {}.*$".format( + htype, hexa, filename)), text): + return ["{}:{}: separation does not match expectation " + "({}#adding-packages-hash)" + .format(self.filename, lineno, self.url_to_manual), text]