mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
Incremental rpm image generation
Incremental rpm image generation, the rootfs would be totally removed and
re-created in the second generation by default, but with
INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will do
update(remove/add some pkgs) on it.
NOTE: This is not suggested when you want to create a productive rootfs
For example:
1) Add the follow config option to a conf file:
INC_RPM_IMAGE_GEN = "1"
2) bitbake core-image-sato
modify a package
bitbake core-image-sato
The rootfs would not be totally removed and re-created in the second
generation, it would be simply updated based on the "package".
Implatation:
1) Figure out the pkg which need to be removed or re-installed, then use
'rpm -e to remove the old one. Use the rpm's BUILDTIME to determine
which pkg has been rebuilt.
2) Figure out the pkg which is newly added, and use 'rpm -U' to install
it.
This only for the rpm based rootfs, the deb and ipk based rootfs would
be done later.
[YOCTO #1651]
(From OE-Core rev: 575ba3c9e153a1d8ac228a99a03ca2df5fbca151)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
489cde8eb0
commit
9d1823b2a0
@@ -134,15 +134,22 @@ do_rootfs[umask] = 022
|
||||
|
||||
fakeroot do_rootfs () {
|
||||
#set -x
|
||||
rm -rf ${IMAGE_ROOTFS}
|
||||
# When use the rpm incremental image generation, don't remove the rootfs
|
||||
if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
|
||||
rm -rf ${IMAGE_ROOTFS}
|
||||
fi
|
||||
rm -rf ${MULTILIB_TEMP_ROOTFS}
|
||||
mkdir -p ${IMAGE_ROOTFS}
|
||||
mkdir -p ${DEPLOY_DIR_IMAGE}
|
||||
|
||||
cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOY_DIR_IMAGE}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
|
||||
|
||||
if [ "${USE_DEVFS}" != "1" ]; then
|
||||
# If "${IMAGE_ROOTFS}/dev" exists, then the device had been made by
|
||||
# the previous build
|
||||
if [ "${USE_DEVFS}" != "1" -a ! -r "${IMAGE_ROOTFS}/dev" ]; then
|
||||
for devtable in ${@get_devtable_list(d)}; do
|
||||
# Always return ture since there maybe already one when use the
|
||||
# incremental image generation
|
||||
makedevs -r ${IMAGE_ROOTFS} -D $devtable
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user