aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs-postcommands.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-06 22:57:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 15:54:34 +0000
commitc2dab181c1cdabac3be6197f4b9ea4235cbbc140 (patch)
tree5a051e5f0bfab19ed57b6bb86f7e3101cebe24b6 /meta/classes/rootfs-postcommands.bbclass
parent800528eaa421d451b596545125cb218e08989151 (diff)
downloadopenembedded-core-contrib-c2dab181c1cdabac3be6197f4b9ea4235cbbc140.tar.gz
image: Create separate tasks for rootfs construction
This patch splits the code in lib/oe/image into separate tasks, one per image type. This removes the need for the simple task graph code and defers to the bitbake task management code to handle this instead. This is a good step forward in splitting up the monolithic code and starting to make it more accessible to people. It should also make it easier for people to hook in other tasks and processes into the rootfs code. Incidentally, the reason this code was all combined originally was due to limitations of fakeroot where if you exited the session, you lost permissions data. With pseudo this constraint was removed. We did start to rework the rootfs/image code previously and got so far with untangling it however we did prioritise some performance tweaks over splitting into separate tasks and in hindsight, this was a mistake and should have been done the other way around. That work was suspended due to changes in the people working on the project but this split has always been intended, now is the time to finish it IMO. There were some side effects of doing this: * The symlink for the manifest moves to the rootfs-postcommands class and into the manifest function. * There is no seperate "symlink removal" and "symlink creation", they are merged * The date/time stamps of the manifest and the built images can now be different since the tasks can be run separately and the datetime stamp will then be different between do_rootfs and the do_image_* tasks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 7c440acf00..96d3051429 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -207,9 +207,20 @@ insert_feed_uris () {
python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
- with open(d.getVar('IMAGE_MANIFEST', True), 'w+') as image_manifest:
+
+ deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True)
+ link_name = d.getVar('IMAGE_LINK_NAME', True)
+ manifest_name = d.getVar('IMAGE_MANIFEST', True)
+
+ with open(manifest_name, 'w+') as image_manifest:
image_manifest.write(image_list_installed_packages(d, 'ver'))
image_manifest.write("\n")
+
+ if manifest_name is not None and os.path.exists(manifest_name):
+ manifest_link = deploy_dir + "/" + link_name + ".manifest"
+ if os.path.exists(manifest_link):
+ os.remove(manifest_link)
+ os.symlink(os.path.basename(manifest_name), manifest_link)
}
# Can be use to create /etc/timestamp during image construction to give a reasonably