From: Gary Thomas <gary@mlbassoc.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] sanity.bbclass: check for validity of TMPDIR
Date: Thu, 14 Nov 2013 06:27:09 -0700 [thread overview]
Message-ID: <5284CFAD.2060903@mlbassoc.com> (raw)
In-Reply-To: <a86f7984cd1b08978d4358f862ff97d3d5cd3fb7.1384433183.git.Qi.Chen@windriver.com>
On 2013-11-14 06:07, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> TMPDIR must be an absolute path, otherwise, the build will fail.
> Special characters in TMPDIR will also cause build failures.
>
> This patch enables checking for the validity of TMPDIR.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/classes/sanity.bbclass | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 83378b0..e45906e 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -672,6 +672,13 @@ def check_sanity_everybuild(status, d):
> with open(checkfile, "w") as f:
> f.write(tmpdir)
>
> + # Check if TMPDIR contains invalid characters, and check if it is an absolute path
> + valid_tmpdir_regexp = "^/[a-zA-Z0-9\-_/.~]+$"
> + import re
> + valid_pattern = re.compile(valid_tmpdir_regexp)
> + if not valid_pattern.match(tmpdir):
> + status.addresult("Error, you have special characters in TMPDIR directory path or your TMPDIR is not an absolute path. The TMPDIR should match the this regexp: ^/[a-zA-Z0-9\-_/.~]$")
> +
> def check_sanity(sanity_data):
> import subprocess
Check the wording of the warning "The TMPDIR should match the this regexp"
should probably be "The TMPDIR should match this regexp" or maybe use a simpler
version like "The TMPDIR name should must be an absolute path and contain only letters,
digits and the characters -_"
Also, is "-" actually valid? I seem to recall having problems when my build
tree had the hyphen ("-") in the path.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2013-11-14 13:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 13:07 [PATCH 0/1] sanity.bbclass: check for validity of TMPDIR Qi.Chen
2013-11-14 13:07 ` [PATCH 1/1] " Qi.Chen
2013-11-14 13:12 ` Richard Purdie
2013-11-15 2:41 ` ChenQi
2013-11-14 13:27 ` Gary Thomas [this message]
2013-11-14 13:42 ` Phil Blundell
2013-11-14 13:50 ` Gary Thomas
2013-11-14 15:49 ` Mark Hatle
2013-11-14 16:04 ` Phil Blundell
2013-11-14 18:02 ` Mark Hatle
2013-11-14 18:01 ` Saul Wold
2013-11-15 2:49 ` ChenQi
2013-11-15 2:44 ` [PATCH 0/1] " ChenQi
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=5284CFAD.2060903@mlbassoc.com \
--to=gary@mlbassoc.com \
--cc=openembedded-core@lists.openembedded.org \
/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