[oe-commits] org.oe.dev package.bbclass: Add SHLIBSDIR variable and replace hardcoded paths with it. Also replace long since unused old_shlibs_dir (from poky)

rpurdie commit openembedded-commits at lists.openembedded.org
Tue Feb 19 13:11:10 UTC 2008


package.bbclass: Add SHLIBSDIR variable and replace hardcoded paths with it. Also replace long since unused old_shlibs_dir (from poky)

Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: f235aaab757e7ec8bf96df96c676a77814f25972
ViewMTN: http://monotone.openembedded.org/revision/info/f235aaab757e7ec8bf96df96c676a77814f25972
Files:
1
classes/package.bbclass
Diffs:

#
# mt diff -r7a8d9695cda685f2baec892f0841e134dbe841d1 -rf235aaab757e7ec8bf96df96c676a77814f25972
#
# 
# 
# patch "classes/package.bbclass"
#  from [161dac26de935b200cd3201f8df70b3c0e478e53]
#    to [8e214768d4b5d7475123a98be2867fcb5807e8e4]
# 
============================================================
--- classes/package.bbclass	161dac26de935b200cd3201f8df70b3c0e478e53
+++ classes/package.bbclass	8e214768d4b5d7475123a98be2867fcb5807e8e4
@@ -508,7 +508,8 @@ python emit_pkgdata() {
 		os.chdir(root)
 		g = glob('*')
 		if g or allow_empty == "1":
-			file(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), 'w').close()
+			packagedfile = bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d)
+			file(packagedfile, 'w').close()
 }
 emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime"
 
@@ -518,6 +519,8 @@ fi
 fi
 }
 
+SHLIBSDIR = "${STAGING_DIR}/${TARGET_SYS}/shlibs"
+
 python package_do_shlibs() {
 	import os, re, os.path
 
@@ -536,25 +539,14 @@ python package_do_shlibs() {
 		bb.error("WORKDIR not defined")
 		return
 
-	staging = bb.data.getVar('STAGING_DIR', d, 1)
-	if not staging:
-		bb.error("STAGING_DIR not defined")
-		return
-
 	ver = bb.data.getVar('PV', d, 1)
 	if not ver:
 		bb.error("PV not defined")
 		return
 
-	target_sys = bb.data.getVar('TARGET_SYS', d, 1)
-	if not target_sys:
-		bb.error("TARGET_SYS not defined")
-		return
-
 	pkgdest = bb.data.getVar('PKGDEST', d, 1)
 
-	shlibs_dir = os.path.join(staging, target_sys, "shlibs")
-	old_shlibs_dir = os.path.join(staging, "shlibs")
+	shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1)
 	bb.mkdirhier(shlibs_dir)
 
 	needed = {}
@@ -611,7 +603,7 @@ python package_do_shlibs() {
 
 	shlib_provider = {}
 	list_re = re.compile('^(.*)\.list$')
-	for dir in [old_shlibs_dir, shlibs_dir]: 
+	for dir in [shlibs_dir]: 
 		if not os.path.exists(dir):
 			continue
 		for file in os.listdir(dir):
@@ -681,20 +673,9 @@ python package_do_pkgconfig () {
 		bb.error("WORKDIR not defined")
 		return
 
-	staging = bb.data.getVar('STAGING_DIR', d, 1)
-	if not staging:
-		bb.error("STAGING_DIR not defined")
-		return
-
-	target_sys = bb.data.getVar('TARGET_SYS', d, 1)
-	if not target_sys:
-		bb.error("TARGET_SYS not defined")
-		return
-
 	pkgdest = bb.data.getVar('PKGDEST', d, 1)
 
-	shlibs_dir = os.path.join(staging, target_sys, "shlibs")
-	old_shlibs_dir = os.path.join(staging, "shlibs")
+	shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1)
 	bb.mkdirhier(shlibs_dir)
 
 	pc_re = re.compile('(.*)\.pc$')
@@ -744,7 +725,7 @@ python package_do_pkgconfig () {
 				f.write('%s\n' % p)
 			f.close()
 
-	for dir in [old_shlibs_dir, shlibs_dir]:
+	for dir in [shlibs_dir]:
 		if not os.path.exists(dir):
 			continue
 		for file in os.listdir(dir):






More information about the Openembedded-commits mailing list