diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-29 11:18:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 11:18:38 +0100 |
commit | 0b2db436420531d9f4a57e8ec27943bba6ac2b1f (patch) | |
tree | 922e6f2f8316ad719c23814f3e090809c755d019 /classes | |
parent | 0dd9c75b3f187acca3b4032ac2f1ae002b806275 (diff) | |
parent | 2b5d6110db3960a5f37b8ab0836226d7753c74e0 (diff) | |
download | meta-updater-0b2db436420531d9f4a57e8ec27943bba6ac2b1f.tar.gz |
Merge pull request #440 from agners/mandate-usr-move
Use usrmerge
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index ff807a4..4095de0 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -1,4 +1,5 @@ | |||
1 | # OSTree deployment | 1 | # OSTree deployment |
2 | inherit distro_features_check | ||
2 | 3 | ||
3 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | 4 | OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" |
4 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" | 5 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" |
@@ -14,6 +15,7 @@ IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" | |||
14 | CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${OTA_IMAGE_ROOTFS} . || [ $? -eq 1 ]" | 15 | CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${OTA_IMAGE_ROOTFS} . || [ $? -eq 1 ]" |
15 | CONVERSIONTYPES_append = " tar" | 16 | CONVERSIONTYPES_append = " tar" |
16 | 17 | ||
18 | REQUIRED_DISTRO_FEATURES = "usrmerge" | ||
17 | OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" | 19 | OTA_IMAGE_ROOTFS_task-image-ostree = "${OSTREE_ROOTFS}" |
18 | do_image_ostree[dirs] = "${OSTREE_ROOTFS}" | 20 | do_image_ostree[dirs] = "${OSTREE_ROOTFS}" |
19 | do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" | 21 | do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" |
@@ -39,16 +41,6 @@ IMAGE_CMD_ostree () { | |||
39 | mkdir -p usr/rootdirs | 41 | mkdir -p usr/rootdirs |
40 | 42 | ||
41 | mv etc usr/ | 43 | mv etc usr/ |
42 | # Implement UsrMove | ||
43 | dirs="bin sbin lib" | ||
44 | |||
45 | for dir in ${dirs} ; do | ||
46 | if [ -d ${dir} ] && [ ! -L ${dir} ] ; then | ||
47 | mv ${dir} usr/rootdirs/ | ||
48 | rm -rf ${dir} | ||
49 | ln -sf usr/rootdirs/${dir} ${dir} | ||
50 | fi | ||
51 | done | ||
52 | 44 | ||
53 | if [ -n "${SYSTEMD_USED}" ]; then | 45 | if [ -n "${SYSTEMD_USED}" ]; then |
54 | mkdir -p usr/etc/tmpfiles.d | 46 | mkdir -p usr/etc/tmpfiles.d |