summaryrefslogtreecommitdiffstats
path: root/meta/classes
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:13:00 +0000
commitee5e443dba2ee6b2bba318a58f710248894df7c5 (patch)
treea96e11fb20bf67c53c2ed2ea9a79c8c5c17e4a6b /meta/classes
parent88badcf7eb124096c3755087e5c138dca6074f0f (diff)
downloadpoky-ee5e443dba2ee6b2bba318a58f710248894df7c5.tar.gz
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 (From OE-Core rev: 4b31d6f6f0a2a6b9e504ffae0d3b2099cbd7dddc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 () {
429 dest = d.getVar('D', True) 429 dest = d.getVar('D', True)
430 dvar = d.getVar('PKGD', True) 430 dvar = d.getVar('PKGD', True)
431 431
432 bb.mkdirhier(dvar)
433
434 # Start by package population by taking a copy of the installed 432 # Start by package population by taking a copy of the installed
435 # files to operate on 433 # files to operate on
436 subprocess.call('rm -rf %s/*' % (dvar), shell=True)
437 # Preserve sparse files and hard links 434 # Preserve sparse files and hard links
438 subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True) 435 subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True)
439 436
@@ -441,6 +438,8 @@ python perform_packagecopy () {
441 if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d): 438 if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d):
442 rpath_replace (dvar, d) 439 rpath_replace (dvar, d)
443} 440}
441perform_packagecopy[cleandirs] = "${PKGD}"
442perform_packagecopy[dirs] = "${PKGD}"
444 443
445# We generate a master list of directories to process, we start by 444# We generate a master list of directories to process, we start by
446# seeding this list with reasonable defaults, then load from 445# seeding this list with reasonable defaults, then load from
@@ -900,7 +899,6 @@ python populate_packages () {
900 package_list.append(pkg) 899 package_list.append(pkg)
901 d.setVar('PACKAGES', ' '.join(package_list)) 900 d.setVar('PACKAGES', ' '.join(package_list))
902 pkgdest = d.getVar('PKGDEST', True) 901 pkgdest = d.getVar('PKGDEST', True)
903 subprocess.call('rm -rf %s' % pkgdest, shell=True)
904 902
905 seen = [] 903 seen = []
906 904
@@ -1828,7 +1826,7 @@ addtask package before do_build after do_install
1828PACKAGELOCK = "${STAGING_DIR}/package-output.lock" 1826PACKAGELOCK = "${STAGING_DIR}/package-output.lock"
1829SSTATETASKS += "do_package" 1827SSTATETASKS += "do_package"
1830do_package[sstate-name] = "package" 1828do_package[sstate-name] = "package"
1831do_package[cleandirs] = "${PKGDESTWORK}" 1829do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}"
1832do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}" 1830do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}"
1833do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" 1831do_package[sstate-lockfile-shared] = "${PACKAGELOCK}"
1834do_package_setscene[dirs] = "${STAGING_DIR}" 1832do_package_setscene[dirs] = "${STAGING_DIR}"