diff options
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index d373dab408..4194c5621c 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
@@ -114,8 +114,8 @@ fakeroot rootfs_rpm_do_rootfs () { | |||
114 | ${ROOTFS_POSTPROCESS_COMMAND} | 114 | ${ROOTFS_POSTPROCESS_COMMAND} |
115 | 115 | ||
116 | if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then | 116 | if ${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "true", "false" ,d)}; then |
117 | if [ -d ${IMAGE_ROOTFS}/etc/rpm-postinsts ] ; then | 117 | if [ -d ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts ] ; then |
118 | if [ "`ls -A ${IMAGE_ROOTFS}/etc/rpm-postinsts`" != "" ] ; then | 118 | if [ "`ls -A ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts`" != "" ] ; then |
119 | bberror "Some packages could not be configured offline and rootfs is read-only." | 119 | bberror "Some packages could not be configured offline and rootfs is read-only." |
120 | exit 1 | 120 | exit 1 |
121 | fi | 121 | fi |
@@ -135,6 +135,20 @@ fakeroot rootfs_rpm_do_rootfs () { | |||
135 | log_check rootfs | 135 | log_check rootfs |
136 | } | 136 | } |
137 | 137 | ||
138 | rootfs_rpm_do_rootfs[vardeps] += "delayed_postinsts" | ||
139 | |||
140 | delayed_postinsts() { | ||
141 | if [ -d ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts ]; then | ||
142 | ls ${IMAGE_ROOTFS}${sysconfdir}/rpm-postinsts | ||
143 | fi | ||
144 | } | ||
145 | |||
146 | save_postinsts() { | ||
147 | # this is just a stub. For RPM, the failed postinstalls are already saved in | ||
148 | # /etc/rpm-postinsts | ||
149 | true | ||
150 | } | ||
151 | |||
138 | remove_packaging_data_files() { | 152 | remove_packaging_data_files() { |
139 | # Save the rpmlib for increment rpm image generation | 153 | # Save the rpmlib for increment rpm image generation |
140 | t="${T}/saved_rpmlib/var/lib" | 154 | t="${T}/saved_rpmlib/var/lib" |
@@ -165,6 +179,15 @@ rootfs_install_packages() { | |||
165 | package_install_internal_rpm | 179 | package_install_internal_rpm |
166 | } | 180 | } |
167 | 181 | ||
182 | rootfs_remove_packages() { | ||
183 | rpm -e --nodeps --root=${IMAGE_ROOTFS} --dbpath=/var/lib/rpm\ | ||
184 | --define='_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper'\ | ||
185 | --define='_tmppath /install/tmp' $@ | ||
186 | |||
187 | # remove temp directory | ||
188 | rm -rf ${IMAGE_ROOTFS}/install | ||
189 | } | ||
190 | |||
168 | python () { | 191 | python () { |
169 | if d.getVar('BUILD_IMAGES_FROM_FEEDS', True): | 192 | if d.getVar('BUILD_IMAGES_FROM_FEEDS', True): |
170 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') | 193 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') |