summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass36
-rw-r--r--classes/debian.bbclass5
-rw-r--r--classes/gnome.bbclass2
-rw-r--r--classes/gtk-binver.bbclass2
-rw-r--r--classes/image.bbclass12
-rw-r--r--classes/multimachine.bbclass1
-rw-r--r--classes/native.bbclass6
-rw-r--r--classes/openmoko2.bbclass4
-rw-r--r--classes/package.bbclass175
-rw-r--r--classes/package_deb.bbclass36
-rw-r--r--classes/package_ipk.bbclass96
-rw-r--r--classes/package_rpm.bbclass18
-rw-r--r--classes/package_tar.bbclass20
-rw-r--r--classes/pkgconfig.bbclass4
-rw-r--r--classes/qmake-base.bbclass66
-rw-r--r--classes/qmake.bbclass65
-rw-r--r--classes/qmake2.bbclass20
-rw-r--r--classes/qt4x11.bbclass19
-rw-r--r--classes/rm_work.bbclass4
-rw-r--r--classes/rootfs_deb.bbclass52
-rw-r--r--classes/rootfs_ipk.bbclass72
-rw-r--r--classes/sdk.bbclass24
-rw-r--r--classes/siteinfo.bbclass2
23 files changed, 398 insertions, 343 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 32f7fcbe31..d4b327e266 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -374,6 +374,9 @@ oe_machinstall() {
fi
}
+# Remove and re-create ${D} so that is it guaranteed to be empty
+do_install[cleandirs] = "${D}"
+
addtask listtasks
do_listtasks[nostamp] = "1"
python do_listtasks() {
@@ -482,8 +485,11 @@ python base_do_fetch() {
(type,host,path,_,_,_) = bb.decodeurl(url)
uri = "%s://%s%s" % (type,host,path)
try:
- if not base_chk_file(parser, pn, pv,uri, localpath, d):
- bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri))
+ if not base_chk_file(parser, pn, pv,uri, localpath, d):
+ if type != "file":
+ bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri))
+ else:
+ bb.debug("%s-%s-%s has no section, not checking URI" % (pn,pv,uri))
except Exception:
raise bb.build.FuncFailed("Checksum of '%s' failed" % uri)
}
@@ -573,10 +579,6 @@ python base_do_unpack() {
local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
except bb.MalformedUrl, e:
raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
- # dont need any parameters for extraction, strip them off
- # RP: Insane. localpath shouldn't have parameters
- # RP: Scehdule for removal with bitbake 1.8.8
- local = re.sub(';.*$', '', local)
local = os.path.realpath(local)
ret = oe_unpack_file(local, localdata, url)
if not ret:
@@ -681,7 +683,8 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T
${STAGING_DATADIR} \
${S} ${B}"
-addtask populate_staging after do_package_write
+# Could be compile but populate_staging and do_install shouldn't run at the same time
+addtask populate_staging after do_install
python do_populate_staging () {
bb.build.exec_func('do_stage', d)
@@ -724,7 +727,7 @@ def explode_deps(s):
def packaged(pkg, d):
import os, bb
- return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK)
+ return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
def read_pkgdatafile(fn):
pkgdata = {}
@@ -750,23 +753,23 @@ def read_pkgdatafile(fn):
def has_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
return os.access(fn, os.R_OK)
def read_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
return read_pkgdatafile(fn)
def has_pkgdata(pn, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
return os.access(fn, os.R_OK)
def read_pkgdata(pn, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
return read_pkgdatafile(fn)
python read_subpackage_metadata () {
@@ -847,7 +850,6 @@ def base_after_parse(d):
paths = []
for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
- paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d))
path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
if os.path.isdir(path):
paths.append(path)
@@ -868,14 +870,6 @@ python () {
base_after_parse(d)
}
-# Remove me when we switch to bitbake 1.8.8
-def base_get_srcrev(d):
- import bb
-
- if hasattr(bb.fetch, "get_srcrev"):
- return bb.fetch.get_srcrev(d)
- return "NOT IMPLEMENTED"
-
# Patch handling
inherit patch
diff --git a/classes/debian.bbclass b/classes/debian.bbclass
index 403c38c752..a38f10d629 100644
--- a/classes/debian.bbclass
+++ b/classes/debian.bbclass
@@ -7,7 +7,10 @@ STAGING_PKGMAPS_DIR = "${STAGING_DIR}/pkgmaps/debian"
#
# Better expressed as ensure all RDEPENDS package before we package
# This means we can't have circular RDEPENDS/RRECOMMENDS
-do_package_write[rdeptask] = "do_package"
+do_package_write_ipk[rdeptask] = "do_package"
+do_package_write_deb[rdeptask] = "do_package"
+do_package_write_tar[rdeptask] = "do_package"
+do_package_write_rpm[rdeptask] = "do_package"
python debian_package_name_hook () {
import glob, copy, stat, errno, re
diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass
index 8643989b73..56233578aa 100644
--- a/classes/gnome.bbclass
+++ b/classes/gnome.bbclass
@@ -13,8 +13,6 @@ FILES_${PN} += "${datadir}/application-registry ${datadir}/mime-info \
inherit autotools pkgconfig gconf
-EXTRA_AUTORECONF += "-I ${STAGING_DIR}/${HOST_SYS}/share/aclocal/gnome2-macros"
-
gnome_stage_includes() {
autotools_stage_includes
}
diff --git a/classes/gtk-binver.bbclass b/classes/gtk-binver.bbclass
index 8398cc5424..52082492e7 100644
--- a/classes/gtk-binver.bbclass
+++ b/classes/gtk-binver.bbclass
@@ -1,7 +1,7 @@
def gtkbinver_find(d):
import bb
try:
- for line in file( "%s/gtk+-2.0.pc" % bb.data.getVar('PKG_CONFIG_PATH', d, 1) ).readlines():
+ for line in file( "%s/gtk+-2.0.pc" % bb.data.getVar('PKG_CONFIG_DIR', d, 1) ).readlines():
if line.startswith( "gtk_binary_version" ):
# bb.note( "gtk_binary_version = '%s'" % line.split("=")[1].strip() )
return line.split("=")[1].strip()
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 38e19df7eb..3420e3f53a 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -1,9 +1,14 @@
inherit rootfs_${IMAGE_PKGTYPE}
+LICENSE = "MIT"
PACKAGES = ""
+RDEPENDS += "${IMAGE_INSTALL}"
+
+IMAGE_BASENAME[export] = "1"
+export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}"
# We need to recursively follow RDEPENDS and RRECOMMENDS for images
-do_rootfs[recrdeptask] = "do_package_write do_deploy do_populate_staging"
+do_rootfs[recrdeptask] += "do_deploy do_populate_staging"
# Images are generally built explicitly, do not need to be part of world.
EXCLUDE_FROM_WORLD = "1"
@@ -50,15 +55,14 @@ def get_devtable_list(d):
return str
IMAGE_POSTPROCESS_COMMAND ?= ""
+MACHINE_POSTPROCESS_COMMAND ?= ""
+ROOTFS_POSTPROCESS_COMMAND ?= ""
# some default locales
IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}"
-ROOTFS_POSTPROCESS_COMMAND ?= ""
-MACHINE_POSTPROCESS_COMMAND ?= ""
-
do_rootfs[nostamp] = "1"
do_rootfs[dirs] = "${TOPDIR}"
do_build[nostamp] = "1"
diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass
index 4187a00ec3..945d22bfe0 100644
--- a/classes/multimachine.bbclass
+++ b/classes/multimachine.bbclass
@@ -1,6 +1,7 @@
STAMP = "${TMPDIR}/stamps/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
WORKDIR = "${TMPDIR}/work/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/${PF}"
STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
+PKGDATA_DIR = "${STAGING_DIR}/pkgdata/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
# Find any machine specific sub packages and if present, mark the
# whole package as machine specific for multimachine purposes.
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 16026f53c9..104d5a49da 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -11,10 +11,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}"
# RPROVIDES becomes unnecessary.
RPROVIDES = "${PN}"
-# Break the circular dependency as a result of DEPENDS
-# in package.bbclass
-PACKAGE_DEPENDS = ""
-
TARGET_ARCH = "${BUILD_ARCH}"
TARGET_OS = "${BUILD_OS}"
TARGET_VENDOR = "${BUILD_VENDOR}"
@@ -95,3 +91,5 @@ do_stage () {
do_install () {
true
}
+
+PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass
index 872dd4915c..ef734e4311 100644
--- a/classes/openmoko2.bbclass
+++ b/classes/openmoko2.bbclass
@@ -29,5 +29,5 @@ S = "${WORKDIR}/${PN}"
FILES_${PN} += "${datadir}/icons"
-# SVNREV = "r${SRCREV}"
-SVNREV = "${SRCDATE}"
+SVNREV = "r${SRCREV}"
+#SVNREV = "${SRCDATE}"
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 95e4acd4d6..5233fa363c 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -2,6 +2,8 @@
# General packaging help functions
#
+PKGDEST = "${WORKDIR}/install"
+
def legitimize_package_name(s):
"""
Make sure package names are legitimate strings
@@ -120,75 +122,67 @@ PACKAGE_DEPENDS += "file-native"
python () {
import bb
-
if bb.data.getVar('PACKAGES', d, True) != '':
deps = bb.data.getVarFlag('do_package', 'depends', d) or ""
for dep in (bb.data.getVar('PACKAGE_DEPENDS', d, True) or "").split():
deps += " %s:do_populate_staging" % dep
bb.data.setVarFlag('do_package', 'depends', deps, d)
- deps = bb.data.getVarFlag('do_package_write', 'depends', d) or ""
- for dep in (bb.data.getVar('PACKAGE_EXTRA_DEPENDS', d, True) or "").split():
- deps += " %s:do_populate_staging" % dep
- bb.data.setVarFlag('do_package_write', 'depends', deps, d)
-
# shlibs requires any DEPENDS to have already packaged for the *.list files
bb.data.setVarFlag('do_package', 'deptask', 'do_package', d)
}
-# file(1) output to match to consider a file an unstripped executable
-FILE_UNSTRIPPED_MATCH ?= "not stripped"
-#FIXME: this should be "" when any errors are gone!
-IGNORE_STRIP_ERRORS ?= "1"
-
-runstrip() {
- # Function to strip a single file, called from RUNSTRIP in populate_packages below
- # A working 'file' (one which works on the target architecture)
- # is necessary for this stuff to work, hence the addition to do_package[depends]
-
- local ro st
-
- st=0
- if { file "$1" || {
- oewarn "file $1: failed (forced strip)" >&2
- echo '${FILE_UNSTRIPPED_MATCH}'
- }
- } | grep -q '${FILE_UNSTRIPPED_MATCH}'
- then
- oenote "${STRIP} $1"
- ro=
- test -w "$1" || {
- ro=1
- chmod +w "$1"
- }
- mkdir -p $(dirname "$1")/.debug
- debugfile="$(dirname "$1")/.debug/$(basename "$1")"
- '${OBJCOPY}' --only-keep-debug "$1" "$debugfile"
- '${STRIP}' "$1"
- st=$?
- '${OBJCOPY}' --add-gnu-debuglink="$debugfile" "$1"
- test -n "$ro" && chmod -w "$1"
- if test $st -ne 0
- then
- oewarn "runstrip: ${STRIP} $1: strip failed" >&2
- if [ x${IGNORE_STRIP_ERRORS} = x1 ]
- then
- #FIXME: remove this, it's for error detection
- if file "$1" 2>/dev/null >&2
- then
- (oefatal "${STRIP} $1: command failed" >/dev/tty)
- else
- (oefatal "file $1: command failed" >/dev/tty)
- fi
- st=0
- fi
- fi
- else
- oenote "runstrip: skip $1"
- fi
- return $st
-}
+def runstrip(file, d):
+ # Function to strip a single file, called from populate_packages below
+ # A working 'file' (one which works on the target architecture)
+ # is necessary for this stuff to work, hence the addition to do_package[depends]
+
+ import bb, os, commands, stat
+
+ pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, 1)
+
+ ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+
+ if ret:
+ bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+
+ if "not stripped" not in result:
+ bb.debug(1, "runstrip: skip %s" % file)
+ return 0
+
+ strip = bb.data.getVar("STRIP", d, 1)
+ objcopy = bb.data.getVar("OBJCOPY", d, 1)
+
+ newmode = None
+ if not os.access(file, os.W_OK):
+ origmode = os.stat(file)[stat.ST_MODE]
+ newmode = origmode | stat.S_IWRITE
+ os.chmod(file, newmode)
+
+ extraflags = ""
+ if ".so" in file and "shared" in result:
+ extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
+ elif "shared" in result or "executable" in result:
+ extraflags = "--remove-section=.comment --remove-section=.note"
+
+ bb.mkdirhier(os.path.join(os.path.dirname(file), ".debug"))
+ debugfile=os.path.join(os.path.dirname(file), ".debug", os.path.basename(file))
+
+ stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+ bb.debug(1, "runstrip: %s" % stripcmd)
+
+ os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
+ ret = os.system("%s%s" % (pathprefix, stripcmd))
+ os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
+
+ if newmode:
+ os.chmod(file, origmode)
+
+ if ret:
+ bb.error("runstrip: '%s' strip command failed" % stripcmd)
+
+ return 1
#
# Package data handling routines
@@ -376,39 +370,27 @@ python populate_packages () {
package_list.append(pkg)
if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
- stripfunc = ""
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
- stripfunc += "\trunstrip %s || st=1\n" % (file)
- if not stripfunc == "":
- from bb import build
- localdata = bb.data.createCopy(d)
- # strip
- bb.data.setVar('RUNSTRIP', '\tlocal st\n\tst=0\n%s\treturn $st' % stripfunc, localdata)
- bb.data.setVarFlag('RUNSTRIP', 'func', 1, localdata)
- bb.build.exec_func('RUNSTRIP', localdata)
+ runstrip(file, d)
+
+ pkgdest = bb.data.getVar('PKGDEST', d, 1)
+ os.system('rm -rf %s' % pkgdest)
for pkg in package_list:
localdata = bb.data.createCopy(d)
- root = os.path.join(workdir, "install", pkg)
-
- os.system('rm -rf %s' % root)
+ root = os.path.join(pkgdest, pkg)
+ bb.mkdirhier(root)
- bb.data.setVar('ROOT', '', localdata)
- bb.data.setVar('ROOT_%s' % pkg, root, localdata)
bb.data.setVar('PKG', pkg, localdata)
-
overrides = bb.data.getVar('OVERRIDES', localdata, 1)
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
- bb.data.setVar('OVERRIDES', overrides+':'+pkg, localdata)
-
+ bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata)
bb.data.update_data(localdata)
- root = bb.data.getVar('ROOT', localdata, 1)
- bb.mkdirhier(root)
filesvar = bb.data.getVar('FILES', localdata, 1) or ""
files = filesvar.split()
for file in files:
@@ -461,7 +443,7 @@ python populate_packages () {
for pkg in package_list:
dangling_links[pkg] = []
pkg_files[pkg] = []
- inst_root = os.path.join(workdir, "install", pkg)
+ inst_root = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(inst_root):
for f in files:
path = os.path.join(root, f)
@@ -513,13 +495,13 @@ python emit_pkgdata() {
if not packages:
return
- data_file = bb.data.expand("${STAGING_DIR}/pkgdata/${PN}", d)
+ data_file = bb.data.expand("${PKGDATA_DIR}/${PN}", d)
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
f.close()
for pkg in packages.split():
- subdata_file = bb.data.expand("${STAGING_DIR}/pkgdata/runtime/%s" % pkg, d)
+ subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d)
sf = open(subdata_file, 'w')
write_if_exists(sf, pkg, 'DESCRIPTION')
write_if_exists(sf, pkg, 'RDEPENDS')
@@ -538,7 +520,7 @@ python emit_pkgdata() {
write_if_exists(sf, pkg, 'pkg_prerm')
sf.close()
}
-emit_pkgdata[dirs] = "${STAGING_DIR}/pkgdata/runtime"
+emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime"
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
@@ -582,6 +564,8 @@ python package_do_shlibs() {
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")
bb.mkdirhier(shlibs_dir)
@@ -594,7 +578,7 @@ python package_do_shlibs() {
needed[pkg] = []
sonames = list()
- top = os.path.join(workdir, "install", pkg)
+ top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
soname = None
@@ -680,7 +664,7 @@ 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")
+ deps_file = os.path.join(pkgdest, pkg + ".shlibdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
if len(deps):
@@ -713,6 +697,8 @@ python package_do_pkgconfig () {
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")
bb.mkdirhier(shlibs_dir)
@@ -726,7 +712,7 @@ python package_do_pkgconfig () {
for pkg in packages.split():
pkgconfig_provided[pkg] = []
pkgconfig_needed[pkg] = []
- top = os.path.join(workdir, "install", pkg)
+ top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
m = pc_re.match(file)
@@ -789,7 +775,7 @@ python package_do_pkgconfig () {
found = True
if found == False:
bb.note("couldn't find pkgconfig module '%s' in any package" % n)
- deps_file = os.path.join(workdir, "install", pkg + ".pcdeps")
+ deps_file = os.path.join(pkgdest, pkg + ".pcdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
if len(deps):
@@ -803,14 +789,14 @@ python read_shlibdeps () {
packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
for pkg in packages:
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
- shlibsfile = bb.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d)
+ shlibsfile = bb.data.expand("${PKGDEST}/" + pkg + ".shlibdeps", d)
if os.access(shlibsfile, os.R_OK):
fd = file(shlibsfile)
lines = fd.readlines()
fd.close()
for l in lines:
rdepends.append(l.rstrip())
- pcfile = bb.data.expand("${WORKDIR}/install/" + pkg + ".pcdeps", d)
+ pcfile = bb.data.expand("${PKGDEST}/" + pkg + ".pcdeps", d)
if os.access(pcfile, os.R_OK):
fd = file(pcfile)
lines = fd.readlines()
@@ -840,7 +826,7 @@ python package_depchains() {
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
def packaged(pkg, d):
- return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK)
+ return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
#bb.note('rdepends for %s is %s' % (base, rdepends))
@@ -916,21 +902,14 @@ python package_do_package () {
do_package[dirs] = "${D}"
addtask package before do_build after do_install
-
-
-PACKAGE_WRITE_FUNCS ?= "read_subpackage_metadata"
-
-python package_do_package_write () {
- for f in (bb.data.getVar('PACKAGE_WRITE_FUNCS', d, 1) or '').split():
- bb.build.exec_func(f, d)
+# Dummy task to mark when all packaging is complete
+do_package_write () {
+ :
}
-do_package_write[dirs] = "${D}"
addtask package_write before do_build after do_package
-
EXPORT_FUNCTIONS do_package do_package_write
-
#
# Helper functions for the package writing classes
#
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index c322af1f15..2ab537f174 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -4,11 +4,8 @@
inherit package
-PACKAGE_EXTRA_DEPENDS += "dpkg-native fakeroot-native"
-
BOOTSTRAP_EXTRA_RDEPENDS += "dpkg"
DISTRO_EXTRA_RDEPENDS += "dpkg"
-PACKAGE_WRITE_FUNCS += "do_package_deb"
IMAGE_PKGTYPE ?= "deb"
python package_deb_fn () {
@@ -64,9 +61,7 @@ python do_package_deb_install () {
}
python do_package_deb () {
- import copy # to back up env data
- import sys
- import re
+ import sys, re, fcntl, copy
workdir = bb.data.getVar('WORKDIR', d, 1)
if not workdir:
@@ -99,10 +94,21 @@ python do_package_deb () {
bb.debug(1, "No packages; nothing to do")
return
+ def lockfile(name):
+ lf = open(name, "a+")
+ fcntl.flock(lf.fileno(), fcntl.LOCK_EX)
+ return lf
+
+ def unlockfile(lf):
+ fcntl.flock(lf.fileno(), fcntl.LOCK_UN)
+ lf.close
+
for pkg in packages.split():
localdata = bb.data.createCopy(d)
root = "%s/install/%s" % (workdir, pkg)
+ lf = lockfile(root + ".lock")
+
bb.data.setVar('ROOT', '', localdata)
bb.data.setVar('ROOT_%s' % pkg, root, localdata)
pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1)
@@ -133,6 +139,7 @@ python do_package_deb () {
if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
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)))
+ unlockfile(lf)
continue
controldir = os.path.join(root, 'DEBIAN')
bb.mkdirhier(controldir)
@@ -246,5 +253,20 @@ python do_package_deb () {
os.rmdir(controldir)
except OSError:
pass
- del localdata
+
+ unlockfile(lf)
}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_deb', 'depends', 'dpkg-native:do_populate_staging fakeroot-native:do_populate_staging', d)
+}
+
+python do_package_write_deb () {
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_deb", d)
+}
+do_package_write_deb[dirs] = "${D}"
+addtask package_write_deb before do_package_write after do_package
+
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index 9200055495..0b7f274a96 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -1,11 +1,11 @@
inherit package
-PACKAGE_EXTRA_DEPENDS += "ipkg-utils-native fakeroot-native"
-
BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg"
-PACKAGE_WRITE_FUNCS += "do_package_ipk"
IMAGE_PKGTYPE ?= "ipk"
+IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf"
+IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf"
+
python package_ipk_fn () {
from bb import data
bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
@@ -53,7 +53,7 @@ python package_ipk_install () {
ret = os.system('ipkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir))
if (ret != 0 ):
raise bb.build.FuncFailed
- f=open(os.path.join(tmpdir, "stamps" ,"do_packages"),"w")
+ f=open(os.path.join(tmpdir, "stamps", "do_packages"),"w")
f.close()
ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile))
@@ -62,10 +62,59 @@ python package_ipk_install () {
raise bb.build.FuncFailed
}
+#
+# Update the Packages index files in ${DEPLOY_DIR_IPK}
+#
+package_update_index_ipk () {
+ set -x
+
+ ipkgarchs="${PACKAGE_ARCHS}"
+
+ if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
+ return
+ fi
+
+ touch ${DEPLOY_DIR_IPK}/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
+
+ for arch in $ipkgarchs; do
+ if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then
+ touch ${DEPLOY_DIR_IPK}/$arch/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/
+ fi
+ if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then
+ touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages
+ ipkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/
+ fi
+ done
+}
+
+#
+# Generate an ipkg conf file ${IPKGCONF_TARGET} suitable for use against
+# the target system and an ipkg conf file ${IPKGCONF_SDK} suitable for
+# use against the host system in sdk builds
+#
+package_generate_ipkg_conf () {
+ mkdir -p ${STAGING_ETCDIR_NATIVE}/
+ echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_TARGET}
+ echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_SDK}
+ ipkgarchs="${PACKAGE_ARCHS}"
+ priority=1
+ for arch in $ipkgarchs; do
+ echo "arch $arch $priority" >> ${IPKGCONF_TARGET}
+ echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${IPKGCONF_SDK}
+ priority=$(expr $priority + 5)
+ if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
+ echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET}
+ fi
+ if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages ] ; then
+ echo "src oe-${BUILD_ARCH}-$arch-sdk file:${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk" >> ${IPKGCONF_SDK}
+ fi
+ done
+}
+
python do_package_ipk () {
- import copy # to back up env data
- import sys
- import re
+ import sys, re, fcntl, copy
workdir = bb.data.getVar('WORKDIR', d, 1)
if not workdir:
@@ -96,16 +145,27 @@ python do_package_ipk () {
tmpdir = bb.data.getVar('TMPDIR', d, 1)
# Invalidate the packages file
if os.access(os.path.join(tmpdir, "stamps", "do_packages"),os.R_OK):
- os.unlink(os.path.join(tmpdir, "stamps" ,"do_packages"))
+ os.unlink(os.path.join(tmpdir, "stamps", "do_packages"))
if packages == []:
bb.debug(1, "No packages; nothing to do")
return
+ def lockfile(name):
+ lf = open(name, "a+")
+ fcntl.flock(lf.fileno(), fcntl.LOCK_EX)
+ return lf
+
+ def unlockfile(lf):
+ fcntl.flock(lf.fileno(), fcntl.LOCK_UN)
+ lf.close
+
for pkg in packages.split():
localdata = bb.data.createCopy(d)
root = "%s/install/%s" % (workdir, pkg)
+ lf = lockfile(root + ".lock")
+
bb.data.setVar('ROOT', '', localdata)
bb.data.setVar('ROOT_%s' % pkg, root, localdata)
pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1)
@@ -134,6 +194,7 @@ python do_package_ipk () {
if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
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)))
+ unlockfile(lf)
continue
controldir = os.path.join(root, 'CONTROL')
@@ -154,7 +215,7 @@ python do_package_ipk () {
fields.append(["Priority: %s\n", ['PRIORITY']])
fields.append(["Maintainer: %s\n", ['MAINTAINER']])
fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']])
- fields.append(["OE: %s\n", ['P']])
+ fields.append(["OE: %s\n", ['PN']])
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
def pullData(l, d):
@@ -231,8 +292,6 @@ 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:
@@ -243,5 +302,18 @@ python do_package_ipk () {
os.rmdir(controldir)
except OSError:
pass
- del localdata
+ unlockfile(lf)
+}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_ipk', 'depends', 'ipkg-utils-native:do_populate_staging fakeroot-native:do_populate_staging', d)
+}
+
+python do_package_write_ipk () {
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_ipk", d)
}
+do_package_write_ipk[dirs] = "${D}"
+addtask package_write_ipk before do_package_write after do_package
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass
index 4955792916..7fc5e8ea96 100644
--- a/classes/package_rpm.bbclass
+++ b/classes/package_rpm.bbclass
@@ -2,7 +2,6 @@ inherit package
inherit rpm_core
RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}"
-PACKAGE_WRITE_FUNCS += "do_package_rpm"
IMAGE_PKGTYPE ?= "rpm"
python write_specfile() {
@@ -54,7 +53,6 @@ python write_specfile() {
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
-# fd = sys.__stdout__
fd = specfile
for var in out_vartranslate.keys():
if out_vartranslate[var][0] == "%":
@@ -123,7 +121,7 @@ python do_package_rpm () {
bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
bb.data.update_data(localdata)
-# stuff
+
root = bb.data.getVar('ROOT', localdata)
basedir = os.path.dirname(root)
pkgoutdir = outdir
@@ -132,3 +130,17 @@ python do_package_rpm () {
bb.build.exec_func('write_specfile', localdata)
del localdata
}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_rpm', 'depends', 'rpm-native:do_populate_staging', d)
+}
+
+
+python do_package_write_rpm () {
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_rpm", d)
+}
+do_package_write_rpm[dirs] = "${D}"
+addtask package_write_rpm before do_build after do_package
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass
index e94e763150..cb4c42b261 100644
--- a/classes/package_tar.bbclass
+++ b/classes/package_tar.bbclass
@@ -1,8 +1,5 @@
inherit package
-PACKAGE_EXTRA_DEPENDS += "tar-native"
-
-PACKAGE_WRITE_FUNCS += "do_package_tar"
IMAGE_PKGTYPE ?= "tar"
python package_tar_fn () {
@@ -78,7 +75,7 @@ python do_package_tar () {
bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
bb.data.update_data(localdata)
-# stuff
+
root = bb.data.getVar('ROOT', localdata)
bb.mkdirhier(root)
basedir = os.path.dirname(root)
@@ -97,9 +94,18 @@ python do_package_tar () {
ret = os.system("tar -czvf %s %s" % (tarfn, '.'))
if ret != 0:
bb.error("Creation of tar %s failed." % tarfn)
+}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d)
+}
- file(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), 'w').close()
-# end stuff
- del localdata
+python do_package_write_tar () {
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_tar", d)
}
+do_package_write_tar[dirs] = "${D}"
+addtask package_write_tar before do_build after do_package
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
index 3256977517..c795c8a709 100644
--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -31,7 +31,7 @@ do_install_append () {
do_stage_append () {
for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do
pcname=`basename $pc`
- install -d ${PKG_CONFIG_PATH}
- cat $pc | sed ${@get_pkgconfig_mangle(d)} -e 's:${D}${libdir}\S*:${STAGING_LIBDIR}:g' -e 's:${D}${prefix}/include\S*:${STAGING_INCDIR}:g' > ${PKG_CONFIG_PATH}/$pcname
+ install -d ${PKG_CONFIG_DIR}
+ cat $pc | sed ${@get_pkgconfig_mangle(d)} -e 's:${D}${libdir}\S*:${STAGING_LIBDIR}:g' -e 's:${D}${prefix}/include\S*:${STAGING_INCDIR}:g' > ${PKG_CONFIG_DIR}/$pcname
done
}
diff --git a/classes/qmake-base.bbclass b/classes/qmake-base.bbclass
index b623b34aaa..52f6d830a0 100644
--- a/classes/qmake-base.bbclass
+++ b/classes/qmake-base.bbclass
@@ -1,4 +1,3 @@
-DEPENDS_prepend = "qmake-native "
OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
@@ -9,22 +8,12 @@ EXTRA_OEMAKE = ' MAKEFLAGS= '
export OE_QMAKE_CC="${CC}"
export OE_QMAKE_CFLAGS="${CFLAGS}"
export OE_QMAKE_CXX="${CXX}"
-export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}"
export OE_QMAKE_LDFLAGS="${LDFLAGS}"
-export OE_QMAKE_LINK="${CCLD}"
export OE_QMAKE_AR="${AR}"
export OE_QMAKE_STRIP="echo"
-export OE_QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic"
-export OE_QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc"
-export OE_QMAKE_RCC="non-existant"
-export OE_QMAKE_QMAKE="${STAGING_BINDIR_NATIVE}/qmake"
export OE_QMAKE_RPATH="-Wl,-rpath-link,"
# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
-export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
-export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
-export OE_QMAKE_LIBS_QT="qte"
-export OE_QMAKE_LIBS_X11=""
oe_qmake_mkspecs () {
mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
@@ -42,3 +31,58 @@ oe_qmake_mkspecs () {
done
}
+qmake-base_do_configure() {
+ case ${QMAKESPEC} in
+ *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++)
+ ;;
+ *-oe-g++)
+ die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
+ ;;
+ *)
+ oenote Searching for qmake spec file
+ paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
+ paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
+
+ if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
+ paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
+ fi
+ for i in $paths; do
+ if test -e $i; then
+ export QMAKESPEC=$i
+ break
+ fi
+ done
+ ;;
+ esac
+
+ oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
+
+ if [ -z "${QMAKE_PROFILES}" ]; then
+ PROFILES="`ls *.pro`"
+ else
+ PROFILES="${QMAKE_PROFILES}"
+ fi
+
+ if [ -z "$PROFILES" ]; then
+ die "QMAKE_PROFILES not set and no profiles found in $PWD"
+ fi
+
+ if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
+ AFTER="-after"
+ QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
+ oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
+ fi
+
+ if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
+ QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
+ oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
+ fi
+
+#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
+ unset QMAKESPEC || true
+ ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
+}
+
+EXPORT_FUNCTIONS do_configure
+
+addtask configure after do_unpack do_patch before do_compile
diff --git a/classes/qmake.bbclass b/classes/qmake.bbclass
index 4f2fceff35..b45e54ca6a 100644
--- a/classes/qmake.bbclass
+++ b/classes/qmake.bbclass
@@ -1,57 +1,14 @@
inherit qmake-base
-qmake_do_configure() {
- case ${QMAKESPEC} in
- *linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++)
- ;;
- *-oe-g++)
- die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
- ;;
- *)
- oenote Searching for qmake spec file
- paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
- paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
+DEPENDS_prepend = "qmake-native "
+
+export OE_QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic"
+export OE_QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc"
+export OE_QMAKE_QMAKE="${STAGING_BINDIR_NATIVE}/qmake"
+export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}"
+export OE_QMAKE_LINK="${CCLD}"
+export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
+export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
+export OE_QMAKE_LIBS_QT="qte"
+export OE_QMAKE_LIBS_X11=""
- if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
- paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
- fi
- for i in $paths; do
- if test -e $i; then
- export QMAKESPEC=$i
- break
- fi
- done
- ;;
- esac
-
- oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
-
- if [ -z "${QMAKE_PROFILES}" ]; then
- PROFILES="`ls *.pro`"
- else
- PROFILES="${QMAKE_PROFILES}"
- fi
-
- if [ -z "$PROFILES" ]; then
- die "QMAKE_PROFILES not set and no profiles found in $PWD"
- fi
-
- if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
- AFTER="-after"
- QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
- oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
- fi
-
- if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
- QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
- oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
- fi
-
-#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
- unset QMAKESPEC || true
- ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
-}
-
-EXPORT_FUNCTIONS do_configure
-
-addtask configure after do_unpack do_patch before do_compile
diff --git a/classes/qmake2.bbclass b/classes/qmake2.bbclass
new file mode 100644
index 0000000000..86f1439b30
--- /dev/null
+++ b/classes/qmake2.bbclass
@@ -0,0 +1,20 @@
+#
+# QMake variables for Qt4
+#
+inherit qmake-base
+
+DEPENDS_prepend = "qmake2-native uicmoc4-native "
+
+export QTDIR = "${STAGING_DIR}/${HOST_SYS}/qt4"
+export QMAKESPEC = "${QTDIR}/mkspecs/${TARGET_OS}-oe-g++"
+export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic4"
+export OE_QMAKE_UIC3 = "${STAGING_BINDIR_NATIVE}/uic34"
+export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc4"
+export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc4"
+export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2"
+export OE_QMAKE_LINK = "${CXX}"
+export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
+export OE_QMAKE_INCDIR_QT = "${QTDIR}/include"
+export OE_QMAKE_LIBDIR_QT = "${QTDIR}/lib"
+export OE_QMAKE_LIBS_QT = "qt"
+export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm"
diff --git a/classes/qt4x11.bbclass b/classes/qt4x11.bbclass
index 7046ef1cb9..76a45c33cb 100644
--- a/classes/qt4x11.bbclass
+++ b/classes/qt4x11.bbclass
@@ -1,18 +1,3 @@
-DEPENDS_prepend = "qmake2-native "
DEPENDS_prepend = "${@["qt4x11 ", ""][(bb.data.getVar('PN', d, 1) == 'qt4-x11-free')]}"
-#
-# override variables set by qmake-base to compile Qt4/X11 apps
-#
-export QTDIR = "${STAGING_DIR}/${HOST_SYS}/qt4"
-export QMAKESPEC = "${QTDIR}/mkspecs/${TARGET_OS}-oe-g++"
-export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic4"
-export OE_QMAKE_UIC3 = "${STAGING_BINDIR_NATIVE}/uic34"
-export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc4"
-export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc4"
-export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2"
-export OE_QMAKE_LINK = "${CXX}"
-export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
-export OE_QMAKE_INCDIR_QT = "${QTDIR}/include"
-export OE_QMAKE_LIBDIR_QT = "${QTDIR}/lib"
-export OE_QMAKE_LIBS_QT = "qt"
-export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm"
+
+inherit qmake2
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
index 2ec7d305f2..8569148212 100644
--- a/classes/rm_work.bbclass
+++ b/classes/rm_work.bbclass
@@ -20,9 +20,7 @@ do_rm_work () {
fi
done
}
-# Uncomment me when we can use bitbake 1.8.8
-#addtask rm_work after do_${RMWORK_ORIG_TASK}
-addtask rm_work after do_build
+addtask rm_work after do_${RMWORK_ORIG_TASK}
do_rm_work_all () {
:
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 32b1c57f1a..d3e5832251 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -3,10 +3,12 @@
#
do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging"
+do_rootfs[recrdeptask] += "do_package_write_deb"
fakeroot rootfs_deb_do_rootfs () {
set +e
- mkdir -p ${IMAGE_ROOTFS}/var/dpkg/{info,updates}
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates
rm -f ${STAGING_DIR}/etc/apt/sources.list.rev
rm -f ${STAGING_DIR}/etc/apt/preferences
@@ -53,26 +55,26 @@ fakeroot rootfs_deb_do_rootfs () {
_getflag () {
cat ${IMAGE_ROOTFS}/var/dpkg/status | sed -n -e "/^Package: $2\$/{n; s/Status: install ok .*/$1/; p}"
}
-
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- for i in ${LINGUAS_INSTALL}; do
- apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -ne 0 ]; then
- exit $?
- fi
- done
- fi
- fi
+
+ if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
+ if [ ! -z "${LINGUAS_INSTALL}" ]; then
+ apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ for i in ${LINGUAS_INSTALL}; do
+ apt-get install $i --force-yes --allow-unauthenticated
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ fi
+ fi
if [ ! -z "${PACKAGE_INSTALL}" ]; then
for i in ${PACKAGE_INSTALL}; do
apt-get install $i --force-yes --allow-unauthenticated
- if [ $? -eq 1 ]; then
+ if [ $? -ne 0 ]; then
exit 1
fi
find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do
@@ -110,9 +112,17 @@ fakeroot rootfs_deb_do_rootfs () {
if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
fi
- ln -s /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
- ln -s /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info
- ln -s /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status
+ if [ ! -e ${IMAGE_ROOTFS}/usr/lib/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}/usr/lib/ipkg
+ fi
+
+ if [ ! -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}/etc/ipkg
+ fi
+
+ ln -sf /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info
+ ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -132,7 +142,7 @@ rootfs_deb_log_check() {
echo -e "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
- do_exit=1
+ do_exit=1
fi
done
test "$do_exit" = 1 && exit 1
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 9a58777ade..6babee30a2 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -6,73 +6,41 @@
#
do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+do_rootfs[recrdeptask] += "do_package_write_ipk"
-IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
+IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
DISTRO_EXTRA_RDEPENDS += " ipkg ipkg-collateral "
PACKAGE_INSTALL_NO_DEPS ?= "0"
-rootfs_ipk_do_indexes () {
- set -x
-
- ipkgarchs="${PACKAGE_ARCHS}"
-
- if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- touch ${DEPLOY_DIR_IPK}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
- fi
-
- for arch in $ipkgarchs; do
- if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then
- touch ${DEPLOY_DIR_IPK}/$arch/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/
- fi
- fi
- done
-}
-
fakeroot rootfs_ipk_do_rootfs () {
set -x
- rootfs_ipk_do_indexes
+ package_update_index_ipk
+ package_generate_ipkg_conf
mkdir -p ${T}
- #Add deploy/ipk as well for backward compat
- echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf
- ipkgarchs="${PACKAGE_ARCHS}"
-
- priority=1
- for arch in $ipkgarchs; do
- echo "arch $arch $priority" >> ${T}/ipkg.conf
- priority=$(expr $priority + 5)
- if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
- echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${T}/ipkg.conf
- fi
- done
ipkg-cl ${IPKG_ARGS} update
-
- # Uclibc builds don't provide this stuff...
- #
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
- for i in ${LINGUAS_INSTALL}; do
- ipkg-cl ${IPKG_ARGS} install $i
- done
- fi
- fi
- if [ ! -z "${PACKAGE_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
- fi
-
+
+ # Uclibc builds don't provide this stuff...
+ if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
+ if [ ! -z "${LINGUAS_INSTALL}" ]; then
+ ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
+ for i in ${LINGUAS_INSTALL}; do
+ ipkg-cl ${IPKG_ARGS} install $i
+ done
+ fi
+ fi
+ if [ ! -z "${PACKAGE_INSTALL}" ]; then
+ ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
+ fi
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
mkdir -p ${IMAGE_ROOTFS}/etc/ipkg/
- grep "^arch" ${T}/ipkg.conf >${IMAGE_ROOTFS}/etc/ipkg/arch.conf
+ grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/ipkg/arch.conf
for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
@@ -112,3 +80,7 @@ rootfs_ipk_log_check() {
test "$do_exit" = 1 && exit 1
true
}
+
+remove_packaging_data_files() {
+ rm -rf ${IMAGE_ROOTFS}/usr/lib/ipkg/
+}
diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass
index 0050b2e48e..8067798000 100644
--- a/classes/sdk.bbclass
+++ b/classes/sdk.bbclass
@@ -2,8 +2,6 @@
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"
-SDK_NAME = "${DISTRO}/${TARGET_ARCH}"
-
OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-sdk"
@@ -18,7 +16,7 @@ CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
-prefix = "/usr/local/${SDK_NAME}"
+prefix = "${SDK_PREFIX}"
exec_prefix = "${prefix}"
base_prefix = "${exec_prefix}"
@@ -26,23 +24,3 @@ FILES_${PN} = "${prefix}"
FILES_${PN}-dbg += "${prefix}/bin/.debug \
${prefix}/sbin/.debug \
"
-
-sdk_ipk_do_indexes () {
- set -x
-
- ipkgarchs="${PACKAGE_ARCHS}"
-
- if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- touch ${DEPLOY_DIR_IPK}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
- fi
-
- for arch in $ipkgarchs; do
- if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then
- if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then
- touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/
- fi
- fi
- done
-}
diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass
index 4191f4edc1..c41a3ff369 100644
--- a/classes/siteinfo.bbclass
+++ b/classes/siteinfo.bbclass
@@ -42,6 +42,8 @@ def get_siteinfo_list(d):
"i686-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
"mipsel-linux": "endian-little bit-32 common-glibc",\
"mipsel-linux-uclibc": "endian-little bit-32 common-uclibc",\
+ "mips-linux": "endian-big bit-32 common-glibc",\
+ "mips-linux-uclibc": "endian-big bit-32 common-uclibc",\
"powerpc-darwin": "endian-big bit-32 common-darwin",\
"ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\
"powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\