diff options
author | Ricardo Salveti de Araujo <ricardo.salveti@openbossa.org> | 2009-11-23 07:16:45 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-01-24 04:25:06 +0100 |
commit | 9c0ffdeeacffd6f186578dc4987cc774054952ae (patch) | |
tree | 26ebcb1b1ec6cc78245b367be6dd6e74ee21c398 /classes | |
parent | b1f2058fa03aac97c84174d8c8b32b630ed6aad5 (diff) |
package_deb.bbclass: make the PACKAGES check earlier so if there is nothing to package we don't read potentially stale pkgdata from staging.
This is basically the commit 27b9bc946eeb3faa7b10d92689ab527af42727bd that got
lost when merging poky stuff into the repo. The behavior is much like
what we already have with package_ipk.
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@openbossa.org>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/package_deb.bbclass | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 2a9bf76a79..9fb16740d8 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -86,20 +86,12 @@ python do_package_deb () { return bb.mkdirhier(dvar) - packages = bb.data.getVar('PACKAGES', d, 1) - if not packages: - bb.debug(1, "PACKAGES not defined, nothing to package") - return - tmpdir = bb.data.getVar('TMPDIR', d, 1) if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK): os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN")) - if packages == []: - bb.debug(1, "No packages; nothing to do") - return - + packages = bb.data.getVar('PACKAGES', d, 1) for pkg in packages.split(): localdata = bb.data.createCopy(d) pkgdest = bb.data.getVar('PKGDEST', d, 1) @@ -268,8 +260,13 @@ python () { } python do_package_write_deb () { - bb.build.exec_func("read_subpackage_metadata", d) - bb.build.exec_func("do_package_deb", d) + packages = bb.data.getVar('PACKAGES', d, True) + if not packages: + bb.debug(1, "No PACKAGES defined, nothing to package") + return + + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_deb", d) } do_package_write_deb[dirs] = "${D}" addtask package_write_deb before do_package_write after do_package |