mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
sanity: Further improve directory sanity tests
Add tests to ensure COREBASE/TMPDIR doon't contain ".." as this causes hard to understand build failures. Also rework the code to test TMPDIR and COREBASE for all the patterns since they may be set differently and one may contain problematic characters. [YOCTO #14111] (From OE-Core rev: 8b0aef3f504d650c3208f11b62a7926aa90967f1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f22a6e46d003aba516a9a0cc7f94eae678d846b7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
3e8da09b5f
commit
22d26f0759
|
|
@ -882,15 +882,18 @@ def check_sanity_everybuild(status, d):
|
|||
except:
|
||||
pass
|
||||
|
||||
oeroot = d.getVar('COREBASE')
|
||||
if oeroot.find('+') != -1:
|
||||
status.addresult("Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include any + characters.")
|
||||
if oeroot.find('@') != -1:
|
||||
status.addresult("Error, you have an invalid character (@) in your COREBASE directory path. Please move the installation to a directory which doesn't include any @ characters.")
|
||||
if oeroot.find('%') != -1:
|
||||
status.addresult("Error, you have an invalid character (%) in your COREBASE directory path which causes problems with python string formatting. Please move the installation to a directory which doesn't include any % characters.")
|
||||
if oeroot.find(' ') != -1:
|
||||
status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.")
|
||||
for checkdir in ['COREBASE', 'TMPDIR']:
|
||||
val = d.getVar(checkdir)
|
||||
if val.find('..') != -1:
|
||||
status.addresult("Error, you have '..' in your %s directory path. Please ensure the variable contains an absolute path as this can break some recipe builds in obtuse ways." % checkdir)
|
||||
if val.find('+') != -1:
|
||||
status.addresult("Error, you have an invalid character (+) in your %s directory path. Please move the installation to a directory which doesn't include any + characters." % checkdir)
|
||||
if val.find('@') != -1:
|
||||
status.addresult("Error, you have an invalid character (@) in your %s directory path. Please move the installation to a directory which doesn't include any @ characters." % checkdir)
|
||||
if val.find(' ') != -1:
|
||||
status.addresult("Error, you have a space in your %s directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this." % checkdir)
|
||||
if val.find('%') != -1:
|
||||
status.addresult("Error, you have an invalid character (%) in your %s directory path which causes problems with python string formatting. Please move the installation to a directory which doesn't include any % characters." % checkdir)
|
||||
|
||||
# Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
|
||||
import re
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user