]> code.ossystems Code Review - openembedded-core.git/commit
archiver.bbclass: refactor it
authorRobert Yang <liezhi.yang@windriver.com>
Sun, 5 Jan 2014 14:58:09 +0000 (22:58 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Mar 2014 17:01:30 +0000 (17:01 +0000)
commite5b20199ddddfa2146dc112c0a81f3fd292258e5
tree6356ded8dca658d66d95f814bb9f90e36138b53e
parentd2d3428a0fc746e56c0a0046bd12a393dedb4dda
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@windriver.com>
meta/classes/archiver.bbclass