diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-03-10 14:24:34 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-03-10 14:24:34 +0000 |
commit | 27b9bc946eeb3faa7b10d92689ab527af42727bd (patch) | |
tree | fe90345a5bb5122a5c172d3ed34e7f2c8cf43286 | |
parent | a49dbef3f2322955d6d4ad59021facb240867713 (diff) |
package_ipk/deb.bbclass: Make the PACKAGES check earlier so if there is nothing to package we don't read potentially stale pkgdata from staging. Fixes the strange ncurses-native issue after ncurses packaging was fixed
-rw-r--r-- | classes/package_deb.bbclass | 14 | ||||
-rw-r--r-- | classes/package_ipk.bbclass | 15 |
2 files changed, 14 insertions, 15 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 22b6166685..82a2d53312 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -88,10 +88,6 @@ 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) @@ -102,6 +98,7 @@ python do_package_deb () { 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) @@ -273,8 +270,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 diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 2feaeba3b3..e47bc6a880 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -137,20 +137,12 @@ python do_package_ipk () { 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", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK): os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN")) - if packages == []: - bb.debug(1, "No packages; nothing to do") - return - + packages = bb.data.getVar('PACKAGES', d, True) for pkg in packages.split(): localdata = bb.data.createCopy(d) pkgdest = bb.data.getVar('PKGDEST', d, 1) @@ -313,6 +305,11 @@ python () { } python do_package_write_ipk () { + 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_ipk", d) } |