summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-03 17:21:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-06 13:12:19 +0000
commit4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc (patch)
tree9d6b109a1c1c087cb3a6920d6b31282af754bd68 /meta
parente9d43d7b4d2cfb22b21f3814c2401a699c78b025 (diff)
downloadopenembedded-core-4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc.tar.gz
openembedded-core-4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc.tar.bz2
openembedded-core-4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc.zip
package.bbclass: Make use of cleandirs and dirs function flags
We can use the cleandirs and dirs flags for the fuctions to handle directory cleaning and creation at the bitbake level rather than using these calls within the functions Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass8
1 files changed, 3 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 164e38c505..760f245a52 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -429,11 +429,8 @@ python perform_packagecopy () {
dest = d.getVar('D', True)
dvar = d.getVar('PKGD', True)
- bb.mkdirhier(dvar)
-
# Start by package population by taking a copy of the installed
# files to operate on
- subprocess.call('rm -rf %s/*' % (dvar), shell=True)
# Preserve sparse files and hard links
subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True)
@@ -441,6 +438,8 @@ python perform_packagecopy () {
if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d):
rpath_replace (dvar, d)
}
+perform_packagecopy[cleandirs] = "${PKGD}"
+perform_packagecopy[dirs] = "${PKGD}"
# We generate a master list of directories to process, we start by
# seeding this list with reasonable defaults, then load from
@@ -900,7 +899,6 @@ python populate_packages () {
package_list.append(pkg)
d.setVar('PACKAGES', ' '.join(package_list))
pkgdest = d.getVar('PKGDEST', True)
- subprocess.call('rm -rf %s' % pkgdest, shell=True)
seen = []
@@ -1828,7 +1826,7 @@ addtask package before do_build after do_install
PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
SSTATETASKS += "do_package"
do_package[sstate-name] = "package"
-do_package[cleandirs] = "${PKGDESTWORK}"
+do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
do_package_setscene[dirs] = "${STAGING_DIR}"