1 SUMMARY = "Distribution build manifest"
2 DESCRIPTION = "The /etc/platform-build-info file contains build manifest (SPEC-720)."
5 # information distributed by the package is machine specific
6 PACKAGE_ARCH = "${MACHINE_ARCH}"
8 # dependencies of ${DISTRO_MANIFEST_GENERATOR}
9 DEPENDS = "coreutils-native bash-native git-native gawk-native sed-native"
11 # force a rebuild everytime a build is started
12 do_compile[nostamp] = "1"
16 outfile=${B}/platform-build-info
17 if [ -f "${DISTRO_MANIFEST_GENERATOR}" -a -f "${DISTRO_SETUP_MANIFEST}" ]; then
18 ${DISTRO_MANIFEST_GENERATOR} ${DISTRO_SETUP_MANIFEST} deploy >${outfile}-deploy
20 ${DISTRO_MANIFEST_GENERATOR} ${DISTRO_SETUP_MANIFEST} target >${outfile}-target
22 ${DISTRO_MANIFEST_GENERATOR} ${DISTRO_SETUP_MANIFEST} sdk >${outfile}-sdk
25 if [ "$rc1" -ne 0 -o "$rc2" -ne 0 -o "$rc3" -ne 0 ]; then
30 if [ "$rc" -ne 0 ]; then
31 echo "distro-build-manifest generation failed."
36 # borrowed to os-release.bb (output format is very close)
37 python do_compilestep2 () {
39 with open(d.expand('${B}/platform-build-info-deploy'),'a') as f:
40 for field in d.getVar('BUILD_MANIFEST_FIELDS_DEPLOY').split():
43 f.write('DIST_BB_{0}="{1}"\n'.format(field,value))
45 with open(d.expand('${B}/platform-build-info-target'),'a') as f:
46 for field in d.getVar('BUILD_MANIFEST_FIELDS_TARGET').split():
49 f.write('DIST_BB_{0}="{1}"\n'.format(field,value))
51 with open(d.expand('${B}/platform-build-info-sdk'),'a') as f:
52 for field in d.getVar('BUILD_MANIFEST_FIELDS_SDK').split():
55 f.write('DIST_BB_{0}="{1}"\n'.format(field,value))
57 do_compilestep2[vardeps] += " ${BUILD_MANIFEST_FIELDS_DEPLOY}"
58 do_compilestep2[vardeps] += " ${BUILD_MANIFEST_FIELDS_TARGET}"
59 do_compilestep2[vardeps] += " ${BUILD_MANIFEST_FIELDS_SDK}"
61 # combine the two steps
63 bb.build.exec_func("do_compilestep1",d)
64 bb.build.exec_func("do_compilestep2",d)
68 # install in target dir
69 install -d ${D}${sysconfdir}
70 install -m 0644 platform-build-info-target ${D}${sysconfdir}/platform-build-info
72 # also copy in deploy dir
73 install -d ${DEPLOY_DIR_IMAGE}
74 install -m 0644 platform-build-info-deploy ${DEPLOY_DIR_IMAGE}/platform-build-info
76 # and copy to nativesdk package
80 # list of variables to add to the various manifests
81 # smalles one is 'target', then 'deploy' and finally 'sdk'
82 BUILD_MANIFEST_FIELDS_TARGET = "\
88 DISTRO_BRANCH_VERSION_TAG \
94 BUILD_MANIFEST_FIELDS_DEPLOY = "\
95 ${BUILD_MANIFEST_FIELDS_TARGET} \
101 ALL_MULTILIB_PACKAGE_ARCHS \
104 BUILD_MANIFEST_FIELDS_SDK = "\
105 ${BUILD_MANIFEST_FIELDS_DEPLOY} \
115 # dont exec useless tasks
116 do_fetch[noexec] = "1"
117 do_unpack[noexec] = "1"
118 do_patch[noexec] = "1"
119 do_configure[noexec] = "1"