diff options
Diffstat (limited to 'classes/image_repo_manifest.bbclass')
| -rw-r--r-- | classes/image_repo_manifest.bbclass | 23 |
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 | |||
| 12 | HOSTTOOLS_NONFATAL += " repo " | ||
| 13 | |||
| 14 | # Write build information to target filesystem | ||
| 15 | buildinfo () { | ||
| 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 | |||
| 23 | IMAGE_PREPROCESS_COMMAND += "buildinfo;" | ||
