summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2020-04-25 22:22:37 +0000
committerStefan Agner <stefan.agner@toradex.com>2020-04-27 07:42:22 +0000
commitcd153180c359fefb95d57968b8a4fa0471b588c0 (patch)
tree56ecba3b46447cddbe7a46d2f0389fd5ade63ff2 /classes/image_types_ostree.bbclass
parentc60b6bb82e7121635ce3f7119927e8704fe03f0f (diff)
downloadmeta-updater-cd153180c359fefb95d57968b8a4fa0471b588c0.tar.gz
image_types_ostree/ota: do not commit homes to the OSTree
The home directory currently are commited to the OSTree, presumably to then use it for the deployment. However, we do have access to the original rootfs in the OSTree deployment tasks (do_image_ota) hence transferring the files "via OSTree" is not necessary. We do already carry over some files from the original OE rootfs to /var/sota. Follow this approach for /var/local and /home as well. The home will still be stored in the sysroot as documented in https://ostree.readthedocs.io/en/latest/manual/adapting-existing/. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass12
1 files changed, 5 insertions, 7 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 758ce00..28d9802 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -71,13 +71,11 @@ IMAGE_CMD_ostree () {
71 mkdir -p usr/share/sota/ 71 mkdir -p usr/share/sota/
72 echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname 72 echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname
73 73
74 # Preserve data in /home to be later copied to /sysroot/home by sysroot 74 # home directories get copied from the OE root later to the final sysroot
75 # generating procedure 75 # Create a symlink to var/rootdirs/home to make sure the OSTree deployment
76 mkdir -p usr/homedirs 76 # redirects /home to /var/rootdirs/home.
77 if [ -d "home" ] && [ ! -L "home" ]; then 77 rm -rf home/
78 mv home usr/homedirs/home 78 ln -sf var/rootdirs/home home
79 ln -sf var/rootdirs/home home
80 fi
81 79
82 # Move persistent directories to /var 80 # Move persistent directories to /var
83 dirs="opt mnt media srv" 81 dirs="opt mnt media srv"