mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 12:47:00 +00:00
key-store: fix incorrect postpone to first boot
After postinst was executed at do_rootfs successfully, there will be no first boot to redo. Since `229f4e9 package.bbclass: add support for pkg_postinst_ontarget()' applied in oe-core, use pkg_postinst_ontarget to instead. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
This commit is contained in:
@@ -133,22 +133,20 @@ key_store_sysroot_preprocess() {
|
||||
sysroot_stage_dir "${D}${sysconfdir}" "${SYSROOT_DESTDIR}${sysconfdir}"
|
||||
}
|
||||
|
||||
pkg_postinst_${PN}-rpm-pubkey() {
|
||||
if [ -z "$D" ]; then
|
||||
keydir="${RPM_KEY_DIR}"
|
||||
pkg_postinst_ontarget_${PN}-rpm-pubkey() {
|
||||
keydir="${RPM_KEY_DIR}"
|
||||
|
||||
[ ! -d "$keydir" ] && mkdir -p "$keydir"
|
||||
[ ! -d "$keydir" ] && mkdir -p "$keydir"
|
||||
|
||||
# XXX: only import the new key
|
||||
for keyfile in `ls $keydir/RPM-GPG-KEY-*`; do
|
||||
[ -s "$keyfile" ] || continue
|
||||
# XXX: only import the new key
|
||||
for keyfile in `ls $keydir/RPM-GPG-KEY-*`; do
|
||||
[ -s "$keyfile" ] || continue
|
||||
|
||||
rpm --import "$keyfile" || {
|
||||
echo "Unable to import the public key $keyfile"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
fi
|
||||
rpm --import "$keyfile" || {
|
||||
echo "Unable to import the public key $keyfile"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
PACKAGES = "\
|
||||
|
||||
Reference in New Issue
Block a user