[oe-commits] Martin Jansa : Revert "package.bbclass: Change to operate on a copy of the install directory instead of directly. Also take the opportunity to rename the temp directories so their function is clear (from Poky)"

git version control git at git.openembedded.org
Fri Nov 13 20:57:22 UTC 2009


Module: openembedded.git
Branch: shr/merge
Commit: 9ed817afcf96bb86bb38483cc9c836e8462d0574
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=9ed817afcf96bb86bb38483cc9c836e8462d0574

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Fri Nov 13 21:32:11 2009 +0100

Revert "package.bbclass: Change to operate on a copy of the install directory instead of directly. Also take the opportunity to rename the temp directories so their function is clear (from Poky)"

This reverts commit 29c7d3351f43678c6e93b707b301832009f64b31.

Conflicts:

	classes/package.bbclass

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 classes/package.bbclass |   32 ++++++++++----------------------
 1 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/classes/package.bbclass b/classes/package.bbclass
index 1c14908..064c43c 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -2,8 +2,7 @@
 # General packaging help functions
 #
 
-PKGD    = "${WORKDIR}/package"
-PKGDEST = "${WORKDIR}/packages-split"
+PKGDEST = "${WORKDIR}/install"
 
 def legitimize_package_name(s):
 	"""
@@ -29,7 +28,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
 	"""
 	import os, os.path, bb
 
-	dvar = bb.data.getVar('PKGD', d, True)
+	dvar = bb.data.getVar('D', d, True)
 
 	packages = bb.data.getVar('PACKAGES', d, True).split()
 
@@ -300,7 +299,7 @@ python package_do_split_locales() {
 		bb.note("datadir not defined")
 		return
 
-	dvar = bb.data.getVar('PKGD', d, True)
+	dvar = bb.data.getVar('D', d, True)
 	pn = bb.data.getVar('PN', d, True)
 
 	if pn + '-locale' in packages:
@@ -334,29 +333,19 @@ python package_do_split_locales() {
 	bb.data.setVar('PACKAGES', ' '.join(packages), d)
 }
 
-python perform_packagecopy () {
-	import os
-
-	dest = bb.data.getVar('D', d, True)
-	dvar = bb.data.getVar('PKGD', d, True)
-
-	bb.mkdirhier(dvar)
-
-	# Start by package population by taking a copy of the installed 
-	# files to operate on
-	os.system('cp -pPR %s/* %s/' % (dest, dvar))
-}
-
 python populate_packages () {
 	import os, glob, stat, errno, re
 
 	workdir = bb.data.getVar('WORKDIR', d, True)
 	outdir = bb.data.getVar('DEPLOY_DIR', d, True)
-	dvar = bb.data.getVar('PKGD', d, True)
+	dvar = bb.data.getVar('D', d, True)
 	packages = bb.data.getVar('PACKAGES', d, True)
 	pn = bb.data.getVar('PN', d, True)
 
 	bb.mkdirhier(outdir)
+	bb.mkdirhier(dvar)
+
+
 	os.chdir(dvar)
 
 	def isexec(path):
@@ -1042,12 +1031,11 @@ python package_do_package () {
 
 	workdir = bb.data.getVar('WORKDIR', d, True)
 	outdir = bb.data.getVar('DEPLOY_DIR', d, True)
-	dest = bb.data.getVar('D', d, True)
-	dvar = bb.data.getVar('PKGD', d, True)
+	dvar = bb.data.getVar('D', d, True)
 	pn = bb.data.getVar('PN', d, True)
 
-	if not workdir or not outdir or not dest or not dvar or not pn or not packages:
-		bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
+	if not workdir or not outdir or not dvar or not pn or not packages:
+		bb.error("WORKDIR, DEPLOY_DIR, D, and PN all must be defined, unable to package")
 		return
 
 	for f in (bb.data.getVar('PACKAGEFUNCS', d, True) or '').split():





More information about the Openembedded-commits mailing list