summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2011-12-28 17:16:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-11 10:36:22 +0000
commit9d1823b2a0193b3c20fa30f0a118b4ee80a20027 (patch)
tree9121080b49eabb7cb29db155de82f2e6a1e45445 /meta/classes/rootfs_rpm.bbclass
parent489cde8eb0e19ef6fe8078148199eaf5b52631ae (diff)
downloadpoky-9d1823b2a0193b3c20fa30f0a118b4ee80a20027.tar.gz
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>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 999b8a6c86..48133f080b 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -201,11 +201,15 @@ rootfs_check_package_exists() {
201} 201}
202 202
203rootfs_install_packages() { 203rootfs_install_packages() {
204 # The pkg to be installed here is not controlled by the
205 # package_install_internal_rpm, so it may have already been
206 # installed(e.g, installed in the first time when generate the
207 # rootfs), use '--replacepkgs' to always install them
204 for pkg in $@; do 208 for pkg in $@; do
205 ${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \ 209 ${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \
206 -D "__dbi_txn create nofsync private" \ 210 -D "__dbi_txn create nofsync private" \
207 --noscripts --notriggers --noparentdirs --nolinktos \ 211 --noscripts --notriggers --noparentdirs --nolinktos \
208 -Uhv $pkg || true 212 --replacepkgs -Uhv $pkg || true
209 done 213 done
210} 214}
211 215