diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 17:21:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:13:00 +0000 |
commit | ee5e443dba2ee6b2bba318a58f710248894df7c5 (patch) | |
tree | a96e11fb20bf67c53c2ed2ea9a79c8c5c17e4a6b | |
parent | 88badcf7eb124096c3755087e5c138dca6074f0f (diff) | |
download | poky-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>
-rw-r--r-- | meta/classes/package.bbclass | 8 |
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 | } |
441 | perform_packagecopy[cleandirs] = "${PKGD}" | ||
442 | perform_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 | |||
1828 | PACKAGELOCK = "${STAGING_DIR}/package-output.lock" | 1826 | PACKAGELOCK = "${STAGING_DIR}/package-output.lock" |
1829 | SSTATETASKS += "do_package" | 1827 | SSTATETASKS += "do_package" |
1830 | do_package[sstate-name] = "package" | 1828 | do_package[sstate-name] = "package" |
1831 | do_package[cleandirs] = "${PKGDESTWORK}" | 1829 | do_package[cleandirs] = "${PKGDEST} ${PKGDESTWORK}" |
1832 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}" | 1830 | do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST} ${PKGDESTWORK}" |
1833 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" | 1831 | do_package[sstate-lockfile-shared] = "${PACKAGELOCK}" |
1834 | do_package_setscene[dirs] = "${STAGING_DIR}" | 1832 | do_package_setscene[dirs] = "${STAGING_DIR}" |