diff options
-rw-r--r-- | classes/image_types_ostree.bbclass | 12 | ||||
-rw-r--r-- | conf/distro/sota.conf.inc | 2 | ||||
-rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 4 |
3 files changed, 7 insertions, 11 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 |
diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index ea1ca95..8de9597 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc | |||
@@ -4,7 +4,7 @@ | |||
4 | # | 4 | # |
5 | # require conf/distro/sota.conf.inc | 5 | # require conf/distro/sota.conf.inc |
6 | 6 | ||
7 | DISTRO_FEATURES_append = " sota" | 7 | DISTRO_FEATURES_append = " sota usrmerge" |
8 | DISTRO_FEATURES_NATIVE_append = " sota" | 8 | DISTRO_FEATURES_NATIVE_append = " sota" |
9 | INHERIT += " sota" | 9 | INHERIT += " sota" |
10 | # Prelinking increases the size of downloads and causes build errors | 10 | # Prelinking increases the size of downloads and causes build errors |
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 7e55d07..92bf6fc 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
@@ -36,6 +36,10 @@ class GeneralTests(OESelftestTestCase): | |||
36 | result = get_bb_var('DISTRO_FEATURES').find('sota') | 36 | result = get_bb_var('DISTRO_FEATURES').find('sota') |
37 | self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') | 37 | self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') |
38 | 38 | ||
39 | def test_feature_usrmerge(self): | ||
40 | result = get_bb_var('DISTRO_FEATURES').find('usrmerge') | ||
41 | self.assertNotEqual(result, -1, 'Feature "sota" not set at DISTRO_FEATURES') | ||
42 | |||
39 | def test_feature_systemd(self): | 43 | def test_feature_systemd(self): |
40 | result = get_bb_var('DISTRO_FEATURES').find('systemd') | 44 | result = get_bb_var('DISTRO_FEATURES').find('systemd') |
41 | self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES') | 45 | self.assertNotEqual(result, -1, 'Feature "systemd" not set at DISTRO_FEATURES') |