* [Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file
@ 2020-05-18 7:39 Yair Ben-Avraham
2020-05-18 11:00 ` Heiko Thiery
0 siblings, 1 reply; 2+ messages in thread
From: Yair Ben-Avraham @ 2020-05-18 7:39 UTC (permalink / raw)
To: buildroot
Signed-off-by: Yair Ben Avraham <yairba@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,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file
2020-05-18 7:39 [Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file Yair Ben-Avraham
@ 2020-05-18 11:00 ` Heiko Thiery
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Thiery @ 2020-05-18 11:00 UTC (permalink / raw)
To: buildroot
Hi Yair and all,
Am Mo., 18. Mai 2020 um 09:39 Uhr schrieb Yair Ben-Avraham <
yairba@protonmail.com>:
> Signed-off-by: Yair Ben Avraham <yairba@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 at gmail.com/
--
Heiko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200518/e706026d/attachment.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-18 11:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 7:39 [Buildroot] [PATCH 1/1] Check if two spaces between fields in hash file Yair Ben-Avraham
2020-05-18 11:00 ` Heiko Thiery
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.