summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2018-11-15 16:16:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:39 +0000
commit35015f17519d9395801632145d6457b58d29affe (patch)
tree8a3c3d5be7f67e648744ae4d2b7e4411feadb8a5 /scripts
parent3fd921d551c65f5bd5926b4d211c29463d26b9ab (diff)
downloadpoky-35015f17519d9395801632145d6457b58d29affe.tar.gz
poky-35015f17519d9395801632145d6457b58d29affe.tar.bz2
poky-35015f17519d9395801632145d6457b58d29affe.zip
checklayer: generate locked-sigs.inc under builddir
yocto-check-layer will find locked-sigs.inc under builddir, but locked-sigs.inc is generated under current bitbake working dir. if run yocto-check-layer outside builddir, we will met error like "No such file or directory: *locked-sigs.inc". change to run bitbake -S under builddir to fix this problem. [YOCTO #12973] (From OE-Core rev: 2ec0bc0b038bc6413978c8f34ef5c0d22b4bc3e7) (From OE-Core rev: f236d8782958df953ca1e2a6f09779cbc8f2d600) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/checklayer/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 7788041843..ca7863a19e 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -221,13 +221,13 @@ def add_layer(bblayersconf, layer, layers, logger):
return True
-def check_command(error_msg, cmd):
+def check_command(error_msg, cmd, cwd=None):
'''
Run a command under a shell, capture stdout and stderr in a single stream,
throw an error when command returns non-zero exit code. Returns the output.
'''
- p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=cwd)
output, _ = p.communicate()
if p.returncode:
msg = "%s\nCommand: %s\nOutput:\n%s" % (error_msg, cmd, output.decode('utf-8'))
@@ -257,7 +257,7 @@ def get_signatures(builddir, failsafe=False, machine=None):
os.unlink(sigs_file)
try:
check_command('Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.',
- cmd)
+ cmd, builddir)
except RuntimeError as ex:
if failsafe and os.path.exists(sigs_file):
# Ignore the error here. Most likely some recipes active