diff options
author | Ming Liu <liu.ming50@gmail.com> | 2019-01-14 14:06:48 +0100 |
---|---|---|
committer | Ming Liu <liu.ming50@gmail.com> | 2019-01-14 14:15:06 +0100 |
commit | d49ae8261680ae2cfd4c0179eff013d2def92e1b (patch) | |
tree | 29f2542d8695ab4596525b1c37c7a361bff285bb /classes | |
parent | 2782c5c6243736884bcb6f901ed828014601787f (diff) | |
download | meta-updater-d49ae8261680ae2cfd4c0179eff013d2def92e1b.tar.gz |
meta: drop True option to getVar calls
Search made with the following regex: getVar ?\((.*), True\), this is
to be consistent with OE.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 2 | ||||
-rw-r--r-- | classes/image_types_ota.bbclass | 6 | ||||
-rw-r--r-- | classes/sota.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_sanity.bbclass | 10 |
4 files changed, 10 insertions, 10 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 138e02e..29da78e 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -10,7 +10,7 @@ OSTREE_DEPLOY_DEVICETREE ??= "0" | |||
10 | 10 | ||
11 | BUILD_OSTREE_TARBALL ??= "1" | 11 | BUILD_OSTREE_TARBALL ??= "1" |
12 | 12 | ||
13 | SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" | 13 | SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd', 'true', '')}" |
14 | 14 | ||
15 | IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" | 15 | IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" |
16 | 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 ]" | 16 | 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 ]" |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index fe3d1d8..a31cbd1 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -42,8 +42,8 @@ OTA_IMAGE_ROOTFS_task-image-ota = "${OTA_SYSROOT}" | |||
42 | IMAGE_TYPEDEP_ota = "ostreecommit" | 42 | IMAGE_TYPEDEP_ota = "ostreecommit" |
43 | do_image_ota[dirs] = "${OTA_SYSROOT}" | 43 | do_image_ota[dirs] = "${OTA_SYSROOT}" |
44 | do_image_ota[cleandirs] = "${OTA_SYSROOT}" | 44 | do_image_ota[cleandirs] = "${OTA_SYSROOT}" |
45 | do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | 45 | do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \ |
46 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | 46 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}" |
47 | IMAGE_CMD_ota () { | 47 | IMAGE_CMD_ota () { |
48 | ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT} | 48 | ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT} |
49 | ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME} | 49 | ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME} |
@@ -110,4 +110,4 @@ IMAGE_CMD_ota-ext4 () { | |||
110 | mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} | 110 | mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} |
111 | } | 111 | } |
112 | 112 | ||
113 | do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME', True), '', d)}" | 113 | do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME'), '', d)}" |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 93f59eb..ccc4526 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -21,7 +21,7 @@ WKS_FILE_sota ?= "sdimage-sota.wks" | |||
21 | 21 | ||
22 | EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" | 22 | EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" |
23 | 23 | ||
24 | INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" | 24 | INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" |
25 | 25 | ||
26 | # Please redefine OSTREE_REPO in order to have a persistent OSTree repo | 26 | # Please redefine OSTREE_REPO in order to have a persistent OSTree repo |
27 | export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" | 27 | export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" |
diff --git a/classes/sota_sanity.bbclass b/classes/sota_sanity.bbclass index e47de19..8e80acb 100644 --- a/classes/sota_sanity.bbclass +++ b/classes/sota_sanity.bbclass | |||
@@ -1,17 +1,17 @@ | |||
1 | # Sanity check the sota setup for common misconfigurations | 1 | # Sanity check the sota setup for common misconfigurations |
2 | 2 | ||
3 | def sota_check_overrides(status, d): | 3 | def sota_check_overrides(status, d): |
4 | for var in (d.getVar('SOTA_OVERRIDES_BLACKLIST', True) or "").split(): | 4 | for var in (d.getVar('SOTA_OVERRIDES_BLACKLIST') or "").split(): |
5 | if var in d.getVar('OVERRIDES', True).split(':'): | 5 | if var in d.getVar('OVERRIDES').split(':'): |
6 | status.addresult("%s should not be a overrides, because it is a image fstype in updater layer, please check your OVERRIDES setting.\n" % var) | 6 | status.addresult("%s should not be a overrides, because it is a image fstype in updater layer, please check your OVERRIDES setting.\n" % var) |
7 | 7 | ||
8 | def sota_check_required_variables(status, d): | 8 | def sota_check_required_variables(status, d): |
9 | for var in (d.getVar('SOTA_REQUIRED_VARIABLES', True) or "").split(): | 9 | for var in (d.getVar('SOTA_REQUIRED_VARIABLES') or "").split(): |
10 | if not d.getVar(var, True): | 10 | if not d.getVar(var): |
11 | status.addresult("%s should be set in your local.conf.\n" % var) | 11 | status.addresult("%s should be set in your local.conf.\n" % var) |
12 | 12 | ||
13 | def sota_raise_sanity_error(msg, d): | 13 | def sota_raise_sanity_error(msg, d): |
14 | if d.getVar("SANITY_USE_EVENTS", True) == "1": | 14 | if d.getVar("SANITY_USE_EVENTS") == "1": |
15 | bb.event.fire(bb.event.SanityCheckFailed(msg), d) | 15 | bb.event.fire(bb.event.SanityCheckFailed(msg), d) |
16 | return | 16 | return |
17 | 17 | ||