summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2018-11-19 10:48:58 +0100
committerMing Liu <liu.ming50@gmail.com>2018-11-24 12:12:25 +0100
commitf4cf0698a88631af150782dce9b3dafcb0dbc5d5 (patch)
treebb5fded9e29d420c46759b626ecbc34dcb32f65b /classes/image_types_ostree.bbclass
parent4eaec14b8204ab5cb2e4a3fa2f19c39326909101 (diff)
downloadmeta-updater-f4cf0698a88631af150782dce9b3dafcb0dbc5d5.tar.gz
meta: drop redundant export syntax
There are quite a few 'export' syntax, they are either not necessary or being redundant. Actually only the variables being referred in ostree or aktualizr need to be exported, we can move them into sota.bbclass so they can be exported once only for all other classes referring to them. And drop all other unnecessary exports. Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass13
1 files changed, 4 insertions, 9 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 71cacc6..44a3aa4 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -7,17 +7,12 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
7" 7"
8do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock" 8do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock"
9 9
10export OSTREE_REPO
11export OSTREE_BRANCHNAME
12export GARAGE_TARGET_NAME
13
14OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" 10OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
15
16OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" 11OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}"
17OSTREE_COMMIT_BODY ??= "" 12OSTREE_COMMIT_BODY ??= ""
18OSTREE_UPDATE_SUMMARY ??= "0" 13OSTREE_UPDATE_SUMMARY ??= "0"
19 14
20export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" 15SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}"
21 16
22IMAGE_CMD_ostree () { 17IMAGE_CMD_ostree () {
23 if [ -z "$OSTREE_REPO" ]; then 18 if [ -z "$OSTREE_REPO" ]; then
@@ -62,7 +57,7 @@ IMAGE_CMD_ostree () {
62 fi 57 fi
63 done 58 done
64 59
65 if [ -n "$SYSTEMD_USED" ]; then 60 if [ -n "${SYSTEMD_USED}" ]; then
66 mkdir -p usr/etc/tmpfiles.d 61 mkdir -p usr/etc/tmpfiles.d
67 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf 62 tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf
68 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf} 63 echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf}
@@ -98,7 +93,7 @@ IMAGE_CMD_ostree () {
98 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr" 93 bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr"
99 fi 94 fi
100 95
101 if [ -n "$SYSTEMD_USED" ]; then 96 if [ -n "${SYSTEMD_USED}" ]; then
102 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} 97 echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf}
103 else 98 else
104 echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} 99 echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf}
@@ -113,7 +108,7 @@ IMAGE_CMD_ostree () {
113 bbfatal "Data in /root directory is not preserved by OSTree." 108 bbfatal "Data in /root directory is not preserved by OSTree."
114 fi 109 fi
115 110
116 if [ -n "$SYSTEMD_USED" ]; then 111 if [ -n "${SYSTEMD_USED}" ]; then
117 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf} 112 echo "d /var/roothome 0755 root root -" >>${tmpfiles_conf}
118 else 113 else
119 echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf} 114 echo "mkdir -p /var/roothome; chown 755 /var/roothome" >>${tmpfiles_conf}