summaryrefslogtreecommitdiffstats
path: root/classes/image_repo_manifest.bbclass
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-11-06 13:37:30 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2017-11-06 13:39:44 +0100
commit468b05357d38a21506ed6c999a3088c1d2916a35 (patch)
treeefd91d8efac7bb2f9ab110f9139c9f127b471dfb /classes/image_repo_manifest.bbclass
parent09fbb91f89e48d9a618dd897fc926dcab6b68f2c (diff)
downloadmeta-updater-468b05357d38a21506ed6c999a3088c1d2916a35.tar.gz
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
Diffstat (limited to 'classes/image_repo_manifest.bbclass')
-rw-r--r--classes/image_repo_manifest.bbclass23
1 files changed, 23 insertions, 0 deletions
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 @@
1# Writes the repo manifest to the target filesystem in /etc/manifest.xml
2#
3# Author: Phil Wise <phil@advancedtelematic.com>
4# Usage: add "inherit image_repo_manifest" to your image file
5# To reproduce a build, copy the /etc/manifest.xml to .repo/manifests/yourname.xml
6# then run:
7# repo init -m yourname.xml
8# repo sync
9# For more information, see:
10# https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests
11
12HOSTTOOLS_NONFATAL += " repo "
13
14# Write build information to target filesystem
15buildinfo () {
16 if [ $(which repo) ]; then
17 repo manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml
18 else
19 echo "Android repo tool not food; manifest not copied."
20 fi
21}
22
23IMAGE_PREPROCESS_COMMAND += "buildinfo;"