mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-10-22 13:28:11 +00:00
meta-secure-core: use bb.fatal instead of bb.build.FuncFailed
The bb.build.FuncFailed had been removed in bitbake with commit cfeffb602dd5319f071cd6bcf84139ec77f2d170. Use bb.fatal instead of it. Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
This commit is contained in:
1 parent
8d1b7c2a29
commit
1be79730bf
2 files changed
+6
-8
No files matched your search
@@ -29,8 +29,7 @@ python check_rpm_public_key () {
|
|||||||
(gpg_bin, gpg_path, d.getVar('RPM_GPG_PASSPHRASE', True), gpg_key)
|
(gpg_bin, gpg_path, d.getVar('RPM_GPG_PASSPHRASE', True), gpg_key)
|
||||||
status, output = oe.utils.getstatusoutput(cmd)
|
status, output = oe.utils.getstatusoutput(cmd)
|
||||||
if status:
|
if status:
|
||||||
raise bb.build.FuncFailed('Failed to import gpg key (%s): %s' %
|
bb.fatal('Failed to import gpg key (%s): %s' % (gpg_key, output))
|
||||||
(gpg_key, output))
|
|
||||||
}
|
}
|
||||||
check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock"
|
check_rpm_public_key[lockfiles] = "${TMPDIR}/check_rpm_public_key.lock"
|
||||||
do_package_write_rpm[prefuncs] += "check_rpm_public_key"
|
do_package_write_rpm[prefuncs] += "check_rpm_public_key"
|
||||||
@@ -46,6 +45,5 @@ python () {
|
|||||||
if not os.path.exists(gpg_path):
|
if not os.path.exists(gpg_path):
|
||||||
status, output = oe.utils.getstatusoutput('mkdir -m 0700 -p %s' % gpg_path)
|
status, output = oe.utils.getstatusoutput('mkdir -m 0700 -p %s' % gpg_path)
|
||||||
if status:
|
if status:
|
||||||
raise bb.build.FuncFailed('Failed to create gpg keying %s: %s' %
|
bb.fatal('Failed to create gpg keying %s: %s' % (gpg_path, output))
|
||||||
(gpg_path, output))
|
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ def sign_efi_image(key, cert, input, output, d):
|
|||||||
try:
|
try:
|
||||||
result, _ = bb.process.run(cmd)
|
result, _ = bb.process.run(cmd)
|
||||||
except bb.process.ExecutionError:
|
except bb.process.ExecutionError:
|
||||||
raise bb.build.FuncFailed('ERROR: Unable to sign %s' % input)
|
bb.fatal('Unable to sign %s' % input)
|
||||||
|
|
||||||
def edss_sign_efi_image(input, output, d):
|
def edss_sign_efi_image(input, output, d):
|
||||||
# This function will be overloaded in pulsar-binary-release
|
# This function will be overloaded in pulsar-binary-release
|
||||||
@@ -136,7 +136,7 @@ def sel_sign(key, cert, input, d):
|
|||||||
try:
|
try:
|
||||||
result, _ = bb.process.run(cmd)
|
result, _ = bb.process.run(cmd)
|
||||||
except bb.process.ExecutionError:
|
except bb.process.ExecutionError:
|
||||||
raise bb.build.FuncFailed('ERROR: Unable to sign %s' % input)
|
bb.fatal('Unable to sign %s' % input)
|
||||||
|
|
||||||
def uks_sel_sign(input, d):
|
def uks_sel_sign(input, d):
|
||||||
if d.getVar('UEFI_SB', True) != '1':
|
if d.getVar('UEFI_SB', True) != '1':
|
||||||
@@ -220,7 +220,7 @@ def pem2der(input, output, d):
|
|||||||
try:
|
try:
|
||||||
result, _ = bb.process.run(cmd)
|
result, _ = bb.process.run(cmd)
|
||||||
except bb.process.ExecutionError:
|
except bb.process.ExecutionError:
|
||||||
raise bb.build.FuncFailed('ERROR: Unable to convert %s to %s' % (input, output))
|
raise bb.fatal('Unable to convert %s to %s' % (input, output))
|
||||||
|
|
||||||
# Convert the certificate (PEM formatted) to ESL.
|
# Convert the certificate (PEM formatted) to ESL.
|
||||||
__pem2esl() {
|
__pem2esl() {
|
||||||
@@ -429,7 +429,7 @@ def sanity_check_user_keys(name, may_exit, d):
|
|||||||
|
|
||||||
if _ == False:
|
if _ == False:
|
||||||
if may_exit:
|
if may_exit:
|
||||||
raise bb.build.FuncFailed('ERROR: Unable to find user key for %s ...' % name)
|
bb.fatal('Unable to find user key for %s ...' % name)
|
||||||
|
|
||||||
vprint('Failed to check the user keys for %s ...' % name, d)
|
vprint('Failed to check the user keys for %s ...' % name, d)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user