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