From patchwork Mon May 18 07:39:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yair Ben-Avraham X-Patchwork-Id: 1292377 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=quarantine dis=none) header.from=protonmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=protonmail.com header.i=@protonmail.com header.a=rsa-sha256 header.s=protonmail header.b=PEeDRWKD; 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 49QW9t6lMQz9sTC for ; Mon, 18 May 2020 17:39:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 07CC986A7C; Mon, 18 May 2020 07:39:29 +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 jjUTmEoEouiN; Mon, 18 May 2020 07:39:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CE2E686912; Mon, 18 May 2020 07:39:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 8587A1BF3DC for ; Mon, 18 May 2020 07:39:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 71AFB2049B for ; Mon, 18 May 2020 07:39:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lyLFUrBUvjEb for ; Mon, 18 May 2020 07:39:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail1.protonmail.ch (mail1.protonmail.ch [185.70.40.18]) by silver.osuosl.org (Postfix) with ESMTPS id 0F37C20379 for ; Mon, 18 May 2020 07:39:18 +0000 (UTC) Date: Mon, 18 May 2020 07:39:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1589787555; bh=l86IN1Au+hNVg8w/4gNfte4juTZSj4d8LCGrIVG3qUE=; h=Date:To:From:Reply-To:Subject:From; b=PEeDRWKDtIfVD+sil9fzNpOYOCId7DG5e9vq7o6iGKXVs1IeutVNQVmz046iDuywQ n5LjJ63YMqmN9cuzDktuO6BHmVRs7vispy9qJ58GalnJaF3QHyuLkvHKGTd8Aca/Rq W0vBoUZr5MN/UokHBZwcVUexcPZfA3HevNJtd4w8= To: "buildroot@buildroot.org" From: Yair Ben-Avraham Message-ID: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file 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: , Reply-To: Yair Ben-Avraham Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Yair Ben Avraham --- utils/checkpackagelib/lib_hash.py | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py index 3e381119a5..064d8cb37f 100644 --- a/utils/checkpackagelib/lib_hash.py +++ b/utils/checkpackagelib/lib_hash.py @@ -27,6 +27,11 @@ class HashNumberOfFields(_CheckFunction): .format(self.filename, lineno, self.url_to_manual), text] + if (2 != text.rpartition(' ')[0].count(' ') or + 2 != text.partition(' ')[-1].count(' ')): + return ["{}:{} expected two spaces between fields" + .format(self.filename, lineno), text] + class HashType(_CheckFunction): len_of_hash = {"md5": 32, "sha1": 40, "sha224": 56, "sha256": 64,