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

git at git.openembedded.org git at git.openembedded.org
Fri Mar 21 17:08:17 UTC 2014


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

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

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>

---

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

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


More information about the Openembedded-commits mailing list