[oe-commits] Robert Yang : archiver.bbclass: refactor it

git at git.openembedded.org git at git.openembedded.org
Tue Mar 18 22:59:37 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 888dd7bc8f8a97bd25733ce50548cb009061d742
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=888dd7bc8f8a97bd25733ce50548cb009061d742

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Sun Jan  5 14:58:09 2014 +0000

archiver.bbclass: refactor it

The archiver didn't work, and there were a few problems, for example:
1) There was no src_dir.org (or orig), but the diff command still use it
2) There were a few duplicated code
3) It didn't archive the source for the native or gcc
4) The work flow is not very well
5) The "subprocess.call('fakeroot cp xxxx'" should be removed
6) And others ...

So that we have to refactor it, the benefits are:
1) Fix the problems and make it work well.
2) Reduce more than 300 lines
3) Make it easy to use.

Hre are the explanation about the bbclass:
This bbclass is used for creating archive for:
1) original (or unpacked) source: ARCHIVER_MODE[src] = "original"
2) patched source: ARCHIVER_MODE[src] = "patched" (default)
3) configured source: ARCHIVER_MODE[src] = "configured"
4) The patches between do_unpack and do_patch:
   ARCHIVER_MODE[diff] = "1"
   And you can set the one that you'd like to exclude from the diff:
   ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
5) The environment data, similar to 'bitbake -e recipe':
   ARCHIVER_MODE[dumpdata] = "1"
6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1"

All of the above can be packed into a .src.rpm package: (when PACKAGES
!= "")
ARCHIVER_MODE[srpm] = "1"

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/archiver.bbclass | 829 ++++++++++++++----------------------------
 1 file changed, 275 insertions(+), 554 deletions(-)

Diff:   http://git.openembedded.org/?p=openembedded-core.git/?a=commitdiff;h=888dd7bc8f8a97bd25733ce50548cb009061d742


More information about the Openembedded-commits mailing list