diff options
Diffstat (limited to 'meta/classes/archive-configured-source.bbclass')
-rw-r--r-- | meta/classes/archive-configured-source.bbclass | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass index 1eaaf4cf25..e492ce300d 100644 --- a/meta/classes/archive-configured-source.bbclass +++ b/meta/classes/archive-configured-source.bbclass | |||
@@ -8,10 +8,53 @@ | |||
8 | inherit archiver | 8 | inherit archiver |
9 | 9 | ||
10 | # Get archiving package with configured sources including patches | 10 | # Get archiving package with configured sources including patches |
11 | do_configure[postfuncs] += "do_archive_configured_sources " | 11 | addtask do_archive_configured_sources after do_configure |
12 | 12 | ||
13 | # Get archiving package with temp(logs) and scripts(.bb and inc files) | 13 | # Get archiving package with temp(logs) and scripts(.bb and inc files) |
14 | do_package_write_rpm[prefuncs] += "do_archive_scripts_logs " | 14 | addtask do_archive_scripts_logs after do_package_write_rpm |
15 | 15 | ||
16 | # Get dump date and create diff file | 16 | # Get dump date and create diff file |
17 | do_package_write_rpm[postfuncs] += "do_dumpdata_create_diff_gz " | 17 | addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build |
18 | |||
19 | python () { | ||
20 | if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm': | ||
21 | """ | ||
22 | If package type is not 'srpm' then add tasks to move archive packages of | ||
23 | configured sources and scripts/logs in ${DEPLOY_DIR}/sources. | ||
24 | """ | ||
25 | pn = d.getVar('PN', True) | ||
26 | d.appendVarFlag('do_compile', 'depends', ' %s:do_archive_configured_sources' %pn) | ||
27 | build_deps = ' %s:do_archive_configured_sources' %pn | ||
28 | build_deps += ' %s:do_archive_scripts_logs' %pn | ||
29 | d.appendVarFlag('do_build', 'depends', build_deps) | ||
30 | |||
31 | else: | ||
32 | d.prependVarFlag('do_configure', 'postfuncs', "do_archive_configured_sources") | ||
33 | d.prependVarFlag('do_package_write_rpm', 'prefuncs', "do_archive_scripts_logs") | ||
34 | } | ||
35 | |||
36 | ARCHIVE_SSTATE_OUTDIR = "${DEPLOY_DIR}/sources/" | ||
37 | ARCHIVE_SSTATE_SCRIPTS_LOGS_INDIR = "${WORKDIR}/script-logs/" | ||
38 | ARCHIVE_SSTATE_DIFFGZ_ENVDATA_INDIR = "${WORKDIR}/diffgz-envdata/" | ||
39 | |||
40 | SSTATETASKS += "do_archive_scripts_logs" | ||
41 | do_archive_scripts_logs[sstate-name] = "archive_scripts_logs" | ||
42 | do_archive_scripts_logs[sstate-inputdirs] = "${ARCHIVE_SSTATE_SCRIPTS_LOGS_INDIR}" | ||
43 | do_archive_scripts_logs[sstate-outputdirs] = "${ARCHIVE_SSTATE_OUTDIR}" | ||
44 | |||
45 | python do_archive_scripts_logs_setscene () { | ||
46 | sstate_setscene(d) | ||
47 | } | ||
48 | |||
49 | addtask do_archive_scripts_logs_setscene | ||
50 | |||
51 | SSTATETASKS += "do_dumpdata_create_diff_gz" | ||
52 | do_dumpdata_create_diff_gz[sstate-name] = "dumpdata_create_diff_gz" | ||
53 | do_dumpdata_create_diff_gz[sstate-inputdirs] = "${ARCHIVE_SSTATE_DIFFGZ_ENVDATA_INDIR}" | ||
54 | do_dumpdata_create_diff_gz[sstate-outputdirs] = "${ARCHIVE_SSTATE_OUTDIR}" | ||
55 | |||
56 | python do_dumpdata_create_diff_gz_setscene () { | ||
57 | sstate_setscene(d) | ||
58 | } | ||
59 | |||
60 | addtask do_dumpdata_create_diff_gz_setscene | ||