From 468b05357d38a21506ed6c999a3088c1d2916a35 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 6 Nov 2017 13:37:30 +0100 Subject: Copy repo manifest to the device. Helpful for debugging, etc. Mostly copied from here: https://github.com/openivimobility/meta-oim/blob/master/classes/image-repo-manifest.bbclass --- classes/image_repo_manifest.bbclass | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 classes/image_repo_manifest.bbclass (limited to 'classes/image_repo_manifest.bbclass') diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass new file mode 100644 index 0000000..d508574 --- /dev/null +++ b/classes/image_repo_manifest.bbclass @@ -0,0 +1,23 @@ +# Writes the repo manifest to the target filesystem in /etc/manifest.xml +# +# Author: Phil Wise +# Usage: add "inherit image_repo_manifest" to your image file +# To reproduce a build, copy the /etc/manifest.xml to .repo/manifests/yourname.xml +# then run: +# repo init -m yourname.xml +# repo sync +# For more information, see: +# https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests + +HOSTTOOLS_NONFATAL += " repo " + +# Write build information to target filesystem +buildinfo () { + if [ $(which repo) ]; then + repo manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml + else + echo "Android repo tool not food; manifest not copied." + fi +} + +IMAGE_PREPROCESS_COMMAND += "buildinfo;" -- cgit v1.2.3-54-g00ecf