diff options
author | Liwei Song <liwei.song@windriver.com> | 2019-11-26 16:21:47 +0800 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2019-12-05 11:22:07 +0800 |
commit | 4602842eed5169487242dae2303264d5da16a77b (patch) | |
tree | c8f1e7d6163d7503f9a776d1dce50103c2d67d83 | |
parent | a100ee126ae5aae73214b8dfd1f3edf63c5200c1 (diff) | |
download | meta-secure-core-4602842eed5169487242dae2303264d5da16a77b.tar.gz |
sign_rpm_ext.bbclass: check the length of GPG_PATH
connect to gpg agent may failed due to the GPG_PATH is too long,
check and raise an error if the length is greater than 80.
Signed-off-by: Liwei Song <liwei.song@windriver.com>
-rw-r--r-- | meta-integrity/classes/sign_rpm_ext.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-integrity/classes/sign_rpm_ext.bbclass b/meta-integrity/classes/sign_rpm_ext.bbclass index adc8ae4..855d6b3 100644 --- a/meta-integrity/classes/sign_rpm_ext.bbclass +++ b/meta-integrity/classes/sign_rpm_ext.bbclass | |||
@@ -35,4 +35,8 @@ python () { | |||
35 | gpg_path = d.getVar('TMPDIR', True) + '/.gnupg' | 35 | gpg_path = d.getVar('TMPDIR', True) + '/.gnupg' |
36 | d.setVar('GPG_PATH', gpg_path) | 36 | d.setVar('GPG_PATH', gpg_path) |
37 | 37 | ||
38 | if len(gpg_path) > 80: | ||
39 | msg = "The default GPG_PATH {} of {} characters is too long. Due to GPG homedir path length limit, please set GPG_PATH shorter than 80 characters.".format(gpg_path, len(gpg_path)) | ||
40 | raise bb.parse.SkipRecipe(msg) | ||
41 | |||
38 | } | 42 | } |