summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_ostree.bbclass25
1 files changed, 25 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index d3e7d0d..b1c53ff 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -104,6 +104,31 @@ IMAGE_CMD_ostree () {
104 ln -sf var/roothome root 104 ln -sf var/roothome root
105 fi 105 fi
106 106
107 if [ -d usr/local ] && [ ! -L usr/local ]; then
108 if [ "$(ls -A usr/local)" ]; then
109 bbfatal "Data in /usr/local directory is not preserved by OSTree."
110 fi
111 rm -rf usr/local
112 fi
113
114 if [ -n "${SYSTEMD_USED}" ]; then
115 echo "d /var/usrlocal 0755 root root -" >>${tmpfiles_conf}
116 else
117 echo "mkdir -p /var/usrlocal; chown 755 /var/usrlocal" >>${tmpfiles_conf}
118 fi
119
120 dirs="bin etc games include lib man sbin share src"
121
122 for dir in ${dirs}; do
123 if [ -n "${SYSTEMD_USED}" ]; then
124 echo "d /var/usrlocal/${dir} 0755 root root -" >>${tmpfiles_conf}
125 else
126 echo "mkdir -p /var/usrlocal/${dir}; chown 755 /var/usrlocal/${dir}" >>${tmpfiles_conf}
127 fi
128 done
129
130 ln -sf ../var/usrlocal usr/local
131
107 if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then 132 if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then
108 # this is a hack for ostree not to override init= in kernel cmdline - 133 # this is a hack for ostree not to override init= in kernel cmdline -
109 # make it think that the initramfs is present (while it is in FIT image) 134 # make it think that the initramfs is present (while it is in FIT image)