diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-04-28 19:01:32 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-04-28 19:01:32 +0000 |
commit | 5a51f37cecd6640ef544a8b511d444ee9afb1e34 (patch) | |
tree | ef8052b5c55a92e29468f9888ebacd1298430deb /classes/sourcepkg.bbclass | |
parent | 0ab106f1f08f87203e7bcdb1ec896d1e62a65416 (diff) | |
parent | 36b64099ff67b193c65de69009ae054a32790aff (diff) |
merge of '322ea19f98c9c37886c8eb080fbd9c6a552f7b1d'
and 'bbaee78aa2be4934e6fb2377a1ef53589b7e3b7c'
Diffstat (limited to 'classes/sourcepkg.bbclass')
-rw-r--r-- | classes/sourcepkg.bbclass | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/classes/sourcepkg.bbclass b/classes/sourcepkg.bbclass index f7daa9f46c..bbc9f187ec 100644 --- a/classes/sourcepkg.bbclass +++ b/classes/sourcepkg.bbclass @@ -18,20 +18,14 @@ def get_src_tree(d): bb.error("S not defined, unable to find source tree.") return - try: - s_tree_raw = s.split('/')[1] - except IndexError: - return - + s_tree_raw = s.split('/')[1] s_tree = bb.data.expand(s_tree_raw, d) src_tree_path = os.path.join(workdir, s_tree) try: os.listdir(src_tree_path) except OSError: - bb.error("Expected to find source tree in '%s' which doesn't exist." % src_tree_path, s) - return - + bb.fatal("Expected to find source tree in '%s' which doesn't exist." % src_tree_path) bb.debug("Assuming source tree is '%s'" % src_tree_path) return s_tree @@ -45,14 +39,11 @@ sourcepkg_do_create_orig_tgz(){ done src_tree=${@get_src_tree(d)} - if test x${src_tree} = x; then - oenote "Skipping empty source tree" - return - fi - + + echo $src_tree oenote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz" tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz --exclude-from temp/exclude-from-file $src_tree - cp -av $src_tree $src_tree.orig + cp -pPR $src_tree $src_tree.orig } sourcepkg_do_archive_bb() { @@ -83,14 +74,7 @@ python sourcepkg_do_dumpdata() { bb.note("Dumping metadata into '%s'" % dumpfile) f = open(dumpfile, "w") # emit variables and shell functions - - # FIXME: if we emit all, bitbake will get error while - # evaluating AUTOREV since we have AUTOREV = - # "${@bb.fetch.get_srcrev(d)}" in bitbake.conf, but get_srcrev - # without a valid SRC_URI will cause problem. - - bb.data.emit_env(f, d, True) - + bb.data.emit_env(f, d, True) # emit the metadata which isnt valid shell for e in d.keys(): if bb.data.getVarFlag(e, 'python', d): @@ -105,11 +89,8 @@ sourcepkg_do_create_diff_gz(){ echo $i >> temp/exclude-from-file done + src_tree=${@get_src_tree(d)} - if test x${src_tree} = x; then - oenote "Skipping empty source tree" - return - fi for i in `find . -maxdepth 1 -type f`; do mkdir -p $src_tree/${DISTRO}/files @@ -121,10 +102,10 @@ sourcepkg_do_create_diff_gz(){ rm -rf $src_tree.orig } -#EXPORT_FUNCTIONS do_create_orig_tgz do_archive_bb do_dumpdata do_create_diff_gz -EXPORT_FUNCTIONS do_create_orig_tgz do_archive_bb do_create_diff_gz +EXPORT_FUNCTIONS do_create_orig_tgz do_archive_bb do_dumpdata do_create_diff_gz addtask create_orig_tgz after do_unpack before do_patch -addtask archive_bb after do_patch before do_configure -#addtask dumpdata after do_archive_bb before do_configure -addtask create_diff_gz after do_archive_bb before do_configure +addtask archive_bb after do_patch before do_dumpdata +addtask dumpdata after do_archive_bb before do_create_diff_gz +addtask create_diff_gz after do_dump_data before do_configure + |