Patchwork [6/9] archive-original-source.bbclass: Archive original source

login
register
mail settings
Submitter Xiaofeng Yan
Date March 27, 2012, 2:24 a.m.
Message ID <6e0ca0c81e5212e3085154e6162448d8c2504701.1332814325.git.xiaofeng.yan@windriver.com>
Download mbox | patch
Permalink /patch/24587/
State New
Headers show

Comments

Xiaofeng Yan - March 27, 2012, 2:24 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

This bbclass prepares for archiving original source.
If original source is tarball, then copy this tarball to
${DEPLOY_DIR}/sources.
If original source is dirctory, then archive this directory to
tarball

[YOCTO #1977]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/classes/archive-original-source.bbclass |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 meta/classes/archive-original-source.bbclass

Patch

diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
new file mode 100644
index 0000000..b085533
--- /dev/null
+++ b/meta/classes/archive-original-source.bbclass
@@ -0,0 +1,14 @@ 
+# This file is for getting archiving packages with original sources(archive 's' after unpack stage),patches,logs(archive 'temp' after package_write_rpm),dump data and 
+# creating diff file(get all environment variables and functions in building and mapping all content in 's' including patches to  xxx.diff.gz.
+# All archived packages will be deployed in ${DEPLOY_DIR}/sources
+
+inherit archiver
+
+# Get original sources archiving package with patches
+do_unpack[postfuncs] += "do_archive_original_sources_patches "
+
+# Get archiving package with temp(logs) and scripts(.bb and inc files)
+do_package_write_rpm[prefuncs] += "do_archive_scripts_logs "
+
+# Get dump date and create diff file 
+do_package_write_rpm[postfuncs] += "do_dumpdata_create_diff_gz "