diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-09-05 03:53:08 -0400 |
|---|---|---|
| committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2018-09-05 18:53:58 +0800 |
| commit | 13ae9807965013dac84d188e0e70b431fbf0cd23 (patch) | |
| tree | 98a9cde47f1cbd435baaca15477f228ad8f0cf3f | |
| parent | 23b208c08c73ca09e6c19fcf7bf1646a8400359b (diff) | |
| download | meta-secure-core-13ae9807965013dac84d188e0e70b431fbf0cd23.tar.gz | |
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>
| -rw-r--r-- | meta-signing-key/recipes-support/key-store/key-store_0.1.bb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/meta-signing-key/recipes-support/key-store/key-store_0.1.bb b/meta-signing-key/recipes-support/key-store/key-store_0.1.bb index 30485a7..f5c3e75 100644 --- a/meta-signing-key/recipes-support/key-store/key-store_0.1.bb +++ b/meta-signing-key/recipes-support/key-store/key-store_0.1.bb | |||
| @@ -133,22 +133,20 @@ key_store_sysroot_preprocess() { | |||
| 133 | sysroot_stage_dir "${D}${sysconfdir}" "${SYSROOT_DESTDIR}${sysconfdir}" | 133 | sysroot_stage_dir "${D}${sysconfdir}" "${SYSROOT_DESTDIR}${sysconfdir}" |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | pkg_postinst_${PN}-rpm-pubkey() { | 136 | pkg_postinst_ontarget_${PN}-rpm-pubkey() { |
| 137 | if [ -z "$D" ]; then | 137 | keydir="${RPM_KEY_DIR}" |
| 138 | keydir="${RPM_KEY_DIR}" | ||
| 139 | 138 | ||
| 140 | [ ! -d "$keydir" ] && mkdir -p "$keydir" | 139 | [ ! -d "$keydir" ] && mkdir -p "$keydir" |
| 141 | 140 | ||
| 142 | # XXX: only import the new key | 141 | # XXX: only import the new key |
| 143 | for keyfile in `ls $keydir/RPM-GPG-KEY-*`; do | 142 | for keyfile in `ls $keydir/RPM-GPG-KEY-*`; do |
| 144 | [ -s "$keyfile" ] || continue | 143 | [ -s "$keyfile" ] || continue |
| 145 | 144 | ||
| 146 | rpm --import "$keyfile" || { | 145 | rpm --import "$keyfile" || { |
| 147 | echo "Unable to import the public key $keyfile" | 146 | echo "Unable to import the public key $keyfile" |
| 148 | exit 1 | 147 | exit 1 |
| 149 | } | 148 | } |
| 150 | done | 149 | done |
| 151 | fi | ||
| 152 | } | 150 | } |
| 153 | 151 | ||
| 154 | PACKAGES = "\ | 152 | PACKAGES = "\ |
