summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-02-19 12:30:54 +0000
committerRichard Purdie <rpurdie@rpsys.net>2008-02-19 12:30:54 +0000
commit06943f4e268cd80b0ac1601e7da7d3cb0a173917 (patch)
tree665e6fc12250fa3088078a28878ff84b57430d28 /classes
parenta6862865f72d4becafae03b9a973b5c12f6373f2 (diff)
package.bbclass: Add SHLIBSDIR variable and replace hardcoded paths with it. Also replace long since unused old_shlibs_dir (from poky)
Diffstat (limited to 'classes')
-rw-r--r--classes/package.bbclass35
1 files changed, 8 insertions, 27 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index e14349a9e5..0b3a28926b 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -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 @@ if [ x"$D" = "x" ]; then
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):