summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-10-01 13:02:01 +0000
committerRichard Purdie <rpurdie@rpsys.net>2006-10-01 13:02:01 +0000
commit05aeac6a1c5595ef494bd3aa451fbb6aa08104ec (patch)
tree39eada5c3751c23ab0e4e31851f7cc945e11f197
parentb56fc589d47a6dbb4894acd278b4bc9678ab8ccf (diff)
downloadopenembedded-05aeac6a1c5595ef494bd3aa451fbb6aa08104ec.tar.gz
package*.bbclass: Complete syncing with .dev
-rw-r--r--classes/package.bbclass63
-rw-r--r--classes/package_ipk.bbclass3
-rw-r--r--classes/package_tar.bbclass3
3 files changed, 34 insertions, 35 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 2a9d87f347..0e4028f8e4 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -107,7 +107,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
objs.append(relpath)
if extra_depends == None:
- extra_depends = bb.data.getVar('PKG_' + packages[0], d, 1) or packages[0]
+ extra_depends = packages[0]
for o in objs:
import re, stat
@@ -293,10 +293,7 @@ python populate_packages () {
bb.data.setVar('ROOT', '', localdata)
bb.data.setVar('ROOT_%s' % pkg, root, localdata)
- pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1)
- if not pkgname:
- pkgname = pkg
- bb.data.setVar('PKG', pkgname, localdata)
+ bb.data.setVar('PKG', pkg, localdata)
overrides = bb.data.getVar('OVERRIDES', localdata, 1)
if not overrides:
@@ -387,9 +384,8 @@ python populate_packages () {
bb.debug(1, "target found in %s" % p)
if p == pkg:
break
- dp = bb.data.getVar('PKG_' + p, d, 1) or p
- if not dp in rdepends:
- rdepends.append(dp)
+ if not p in rdepends:
+ rdepends.append(p)
break
if found == False:
bb.note("%s contains dangling symlink to %s" % (pkg, l))
@@ -405,21 +401,25 @@ python populate_packages () {
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
- data_file = os.path.join(workdir, "install", pn + ".package")
+ data_file = bb.data.expand("${STAGING_DIR}/pkgdata/${PN}", d)
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
- for pkg in package_list:
- write_if_exists(f, pkg, 'DESCRIPTION')
- write_if_exists(f, pkg, 'RDEPENDS')
- write_if_exists(f, pkg, 'RPROVIDES')
- write_if_exists(f, pkg, 'PKG')
- write_if_exists(f, pkg, 'ALLOW_EMPTY')
- write_if_exists(f, pkg, 'FILES')
- write_if_exists(f, pkg, 'pkg_postinst')
- write_if_exists(f, pkg, 'pkg_postrm')
- write_if_exists(f, pkg, 'pkg_preinst')
- write_if_exists(f, pkg, 'pkg_prerm')
f.close()
+
+ for pkg in package_list:
+ subdata_file = bb.data.expand("${STAGING_DIR}/pkgdata/runtime/%s" % pkg, d)
+ sf = open(subdata_file, 'w')
+ write_if_exists(sf, pkg, 'DESCRIPTION')
+ write_if_exists(sf, pkg, 'RDEPENDS')
+ write_if_exists(sf, pkg, 'RPROVIDES')
+ write_if_exists(sf, pkg, 'PKG')
+ write_if_exists(sf, pkg, 'ALLOW_EMPTY')
+ write_if_exists(sf, pkg, 'FILES')
+ write_if_exists(sf, pkg, 'pkg_postinst')
+ write_if_exists(sf, pkg, 'pkg_postrm')
+ write_if_exists(sf, pkg, 'pkg_preinst')
+ write_if_exists(sf, pkg, 'pkg_prerm')
+ sf.close()
bb.build.exec_func("read_subpackage_metadata", d)
}
@@ -526,10 +526,6 @@ python package_do_shlibs() {
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
- pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
- if not pkgname:
- pkgname = pkg
-
needed[pkg] = []
sonames = list()
top = os.path.join(workdir, "install", pkg)
@@ -551,10 +547,10 @@ python package_do_shlibs() {
sonames.append(m.group(1))
if m and libdir_re.match(root):
needs_ldconfig = True
- shlibs_file = os.path.join(shlibs_dir, pkgname + ".list")
+ shlibs_file = os.path.join(shlibs_dir, pkg + ".list")
if os.path.exists(shlibs_file):
os.remove(shlibs_file)
- shver_file = os.path.join(shlibs_dir, pkgname + ".ver")
+ shver_file = os.path.join(shlibs_dir, pkg + ".ver")
if os.path.exists(shver_file):
os.remove(shver_file)
if len(sonames):
@@ -598,14 +594,12 @@ python package_do_shlibs() {
for pkg in packages.split():
bb.debug(2, "calculating shlib requirements for %s" % pkg)
- p_pkg = bb.data.getVar("PKG_%s" % pkg, d, 1) or pkg
-
deps = list()
for n in needed[pkg]:
if n in shlib_provider.keys():
(dep_pkg, ver_needed) = shlib_provider[n]
- if dep_pkg == p_pkg:
+ if dep_pkg == pkg:
continue
if ver_needed:
@@ -617,7 +611,6 @@ python package_do_shlibs() {
else:
bb.note("Couldn't find shared library provider for %s" % n)
-
deps_file = os.path.join(workdir, "install", pkg + ".shlibdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
@@ -693,8 +686,7 @@ python package_do_pkgconfig () {
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
for pkg in packages.split():
- ppkg = bb.data.getVar("PKG_" + pkg, d, 1) or pkg
- pkgs_file = os.path.join(shlibs_dir, ppkg + ".pclist")
+ pkgs_file = os.path.join(shlibs_dir, pkg + ".pclist")
if os.path.exists(pkgs_file):
os.remove(pkgs_file)
if pkgconfig_provided[pkg] != []:
@@ -783,7 +775,7 @@ python package_do_split_locales() {
pkg = pn + '-locale-' + ln
packages.append(pkg)
bb.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d)
- bb.data.setVar('RDEPENDS_' + pkg, '${PKG_%s} virtual-locale-%s' % (mainpkg, ln), d)
+ bb.data.setVar('RDEPENDS_' + pkg, '%s virtual-locale-%s' % (mainpkg, ln), d)
bb.data.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln), d)
bb.data.setVar('DESCRIPTION_' + pkg, '%s translation for %s' % (l, pn), d)
@@ -794,9 +786,10 @@ python package_do_split_locales() {
bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
}
-PACKAGEFUNCS = "do_install package_do_split_locales \
+PACKAGEFUNCS = "package_do_split_locales \
populate_packages package_do_shlibs \
- package_do_pkgconfig read_shlibdeps"
+ package_do_pkgconfig read_shlibdeps \
+ package_depchains"
python package_do_package () {
for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split():
bb.build.exec_func(f, d)
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index 9ae526bb3b..0cb5128e17 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -129,6 +129,7 @@ python do_package_ipk () {
from bb import note
note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1)))
continue
+
controldir = os.path.join(root, 'CONTROL')
bb.mkdirhier(controldir)
try:
@@ -220,6 +221,8 @@ python do_package_ipk () {
if ret != 0:
raise bb.build.FuncFailed("ipkg-build execution failed")
+ file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close()
+
for script in ["preinst", "postinst", "prerm", "postrm", "control" ]:
scriptfile = os.path.join(controldir, script)
try:
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass
index 359e35f113..63e82f7f39 100644
--- a/classes/package_tar.bbclass
+++ b/classes/package_tar.bbclass
@@ -94,6 +94,9 @@ python do_package_tar () {
ret = os.system("tar -czvf %s %s" % (tarfn, '.'))
if ret != 0:
bb.error("Creation of tar %s failed." % tarfn)
+
+ file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close()
+
# end stuff
del localdata
}