[Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file

Heiko Thiery heiko.thiery at gmail.com
Mon May 18 11:00:38 UTC 2020


Hi Yair and all,

Am Mo., 18. Mai 2020 um 09:39 Uhr schrieb Yair Ben-Avraham <
yairba at protonmail.com>:

> Signed-off-by: Yair Ben Avraham <yairba at protonmail.com>
> ---
>  utils/checkpackagelib/lib_hash.py | 5 +++++
>  1 file changed, 5 insertions(+)
>
> 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,
>
>
There is already a similar patch available:
https://patchwork.ozlabs.org/project/buildroot/patch/20200205212211.29720-1-heiko.thiery@gmail.com/


-- 
Heiko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200518/e706026d/attachment-0002.html>


More information about the buildroot mailing list