From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] utils/checkpackagelib: add function to check of the default package source variable
Date: Mon, 8 Jan 2018 23:48:02 +0100 [thread overview]
Message-ID: <20180108234802.42d06229@windsurf> (raw)
In-Reply-To: <1513599266-6954-1-git-send-email-jerzy.m.grzegorek@gmail.com>
Ricardo,
Do you think you could have a look at the below patch touching
checkpackagelib ?
It looks OK to me, so unless you complain in the next days, I'll apply.
Thanks a lot for your feedback!
Thomas
On Mon, 18 Dec 2017 13:14:26 +0100, Jerzy Grzegorek wrote:
> Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com>
> ---
> utils/checkpackagelib/lib_mk.py | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py
> index 817e809..5ae565c 100644
> --- a/utils/checkpackagelib/lib_mk.py
> +++ b/utils/checkpackagelib/lib_mk.py
> @@ -99,6 +99,25 @@ class PackageHeader(_CheckFunction):
> text]
>
>
> +class RemoveDefaultPackageSourceVariable(_CheckFunction):
> + PACKAGE_NAME = re.compile("/([^/]+)\.mk")
> +
> + def before(self):
> + package = self.PACKAGE_NAME.search(self.filename).group(1)
> + package_upper = package.replace("-", "_").upper()
> + self.package = package
> + self.package_upper = package_upper
> + self.FIND_SOURCE = re.compile(
> + "^{}_SOURCE\s*=\s*{}-\$\({}_VERSION\)\.tar\.gz"
> + .format(package_upper, package, package_upper))
> +
> + def check_line(self, lineno, text):
> + if self.FIND_SOURCE.search(text):
> + return ["{}:{}: remove default value of _SOURCE variable ({}#writing-rules-mk)"
> + .format(self.filename, lineno, self.url_to_manual),
> + text]
> +
> +
> class SpaceBeforeBackslash(_CheckFunction):
> TAB_OR_MULTIPLE_SPACES_BEFORE_BACKSLASH = re.compile(r"^.*( |\t)\\$")
>
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2018-01-08 22:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 12:14 [Buildroot] [PATCH 1/1] utils/checkpackagelib: add function to check of the default package source variable Jerzy Grzegorek
2018-01-08 22:48 ` Thomas Petazzoni [this message]
2018-01-09 2:06 ` Ricardo Martincoski
2018-01-09 8:50 ` Thomas Petazzoni
2018-01-09 12:54 ` Jerzy Grzegorek
2018-01-09 12:51 ` Jerzy Grzegorek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180108234802.42d06229@windsurf \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox