summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/autotools.bbclass3
-rw-r--r--classes/autotools_stage.bbclass6
-rw-r--r--classes/base.bbclass16
-rw-r--r--classes/dietlibc.bbclass30
-rw-r--r--classes/efl.bbclass4
-rw-r--r--classes/failure-cleanup.bbclass18
-rw-r--r--classes/icecc.bbclass20
-rw-r--r--classes/image.bbclass24
-rw-r--r--classes/insane.bbclass2
-rw-r--r--classes/java-native.bbclass11
-rw-r--r--classes/kernel.bbclass12
-rw-r--r--classes/module_strip.bbclass6
-rw-r--r--classes/native.bbclass9
-rw-r--r--classes/package.bbclass10
-rw-r--r--classes/package_deb.bbclass32
-rw-r--r--classes/package_ipk.bbclass15
-rw-r--r--classes/qt4e.bbclass15
-rw-r--r--classes/qt4x11.bbclass3
-rw-r--r--classes/rootfs_deb.bbclass48
-rw-r--r--classes/rootfs_ipk.bbclass5
-rw-r--r--classes/sanity.bbclass6
21 files changed, 204 insertions, 91 deletions
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index fd8687ebb6..20f371a987 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -212,7 +212,8 @@ autotools_stage_all() {
for i in $las
do
sed -e 's/^installed=yes$/installed=no/' \
- -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
+ -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*.la\),${STAGING_LIBDIR}/\1,g' \
+ -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR},g' \
-e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
-i ${STAGE_TEMP}/${libdir}/$i
done
diff --git a/classes/autotools_stage.bbclass b/classes/autotools_stage.bbclass
new file mode 100644
index 0000000000..3007eef969
--- /dev/null
+++ b/classes/autotools_stage.bbclass
@@ -0,0 +1,6 @@
+inherit autotools
+
+do_stage () {
+ autotools_stage_all
+}
+
diff --git a/classes/base.bbclass b/classes/base.bbclass
index fca0edd2fc..18afc1a2fe 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -71,7 +71,13 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
file.write("[%s]\nmd5=%s\nsha256=%s\n\n" % (src_uri, md5data, shadata))
file.close()
- return False
+ if not bb.data.getVar("OE_STRICT_CHECKSUMS",data, True):
+ bb.note("This package has no entry in checksums.ini, please add one")
+ bb.note("\n[%s]\nmd5=%s\nsha256=%s" % (src_uri, md5data, shadata))
+ return True
+ else:
+ bb.note("Missing checksum")
+ return False
if not md5 == md5data:
bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (md5,md5data))
@@ -867,8 +873,12 @@ python base_eventhandler() {
msg += messages.get(name[5:]) or name[5:]
elif name == "UnsatisfiedDep":
msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower())
- if msg:
- note(msg)
+
+ # Only need to output when using 1.8 or lower, the UI code handles it
+ # otherwise
+ if (int(bb.__version__.split(".")[0]) <= 1 and int(bb.__version__.split(".")[1]) <= 8):
+ if msg:
+ note(msg)
if name.startswith("BuildStarted"):
bb.data.setVar( 'BB_VERSION', bb.__version__, e.data )
diff --git a/classes/dietlibc.bbclass b/classes/dietlibc.bbclass
new file mode 100644
index 0000000000..7c7b5fec81
--- /dev/null
+++ b/classes/dietlibc.bbclass
@@ -0,0 +1,30 @@
+DEPENDS =+ "dietlibc"
+
+def dietlibc_after_parse(d):
+ import bb
+ # Remove the NLS
+ cfg = oe_filter_out('--(dis|en)able-nls', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
+ # Remove shared and static and set it right
+ cfg += " --disable-nls --disbale-shared --enable-static"
+ bb.data.setVar('EXTRA_OECONF', cfg, d)
+ cfg = bb.data.getVar('EXTRA_OEMAKE', d, 1) or ""
+ cfg = oe_filter_out("\'CC=", bb.data.getVar('EXTRA_OEMAKE', d, 1) or "", d)
+ cfgtmp = "\'CC=diet ${CCACHE}"
+ cfgtmp += cfg
+ bb.data.setVar('EXTRA_OEMAKE', cfgtmp, d)
+
+python () {
+ dietlibc_after_parse(d)
+}
+
+set_dietlibc_env () {
+ export CC="diet ${CC}"
+}
+
+do_compile_prepend() {
+ set_dietlibc_env
+}
+
+do_configure_prepend() {
+ set_dietlibc_env
+}
diff --git a/classes/efl.bbclass b/classes/efl.bbclass
index d333c4b434..9d24a0f337 100644
--- a/classes/efl.bbclass
+++ b/classes/efl.bbclass
@@ -15,6 +15,10 @@ AUTOTOOLS_STAGE_PKGCONFIG = "1"
# do NOT inherit pkgconfig here, see note in autotools_stage_all
inherit autotools
+do_configure_prepend() {
+ touch config.rpath
+}
+
do_stage() {
autotools_stage_all
}
diff --git a/classes/failure-cleanup.bbclass b/classes/failure-cleanup.bbclass
new file mode 100644
index 0000000000..3870c756c8
--- /dev/null
+++ b/classes/failure-cleanup.bbclass
@@ -0,0 +1,18 @@
+# This class clean a package on failure, a nice way to keep diskspace usage down and force rebuilds
+
+# we want to be an event handler
+addhandler failure_eventhandler
+python failure_eventhandler() {
+ from bb import build, event, note, error, data
+ from bb.event import NotHandled, getName
+
+ if e.data is None or getName(e) == "MsgNote":
+ return NotHandled
+
+ name = getName(e)
+ if name == "PkgFailed":
+ bb.note("Exectuting -c clean on failed build")
+ build.exec_func('do_clean', e.data)
+
+ return NotHandled
+}
diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass
index 7222f6b349..dce29fbbeb 100644
--- a/classes/icecc.bbclass
+++ b/classes/icecc.bbclass
@@ -83,13 +83,15 @@ def create_cross_env(bb,d):
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
#call the modified create-env script
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
- os.path.join(ice_dir,target_sys,'bin','gcc'),
- os.path.join(ice_dir,target_sys,'bin','g++'),
- os.path.join(ice_dir,target_sys,'bin','as'),
+ os.path.join(ice_dir, 'bin', "%s-gcc" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-g++" % target_sys),
+ os.path.join(ice_dir, 'bin', "%s-as" % target_sys),
os.path.join(ice_dir,"ice",cross_name) ) )
return tar_file
@@ -121,7 +123,9 @@ def create_native_env(bb,d):
#check if user has specified a specific icecc-create-env script
#if not use the OE provided one
- cr_env_script = bb.data.getVar('ICECC_ENV_EXEC', d) or bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
+ cr_env_script = bb.data.expand('${ICECC_ENV_EXEC}', d)
+ if cr_env_script == "${ICECC_ENV_EXEC}":
+ cr_env_script = bb.data.expand('${STAGING_DIR}', d)+"/ice/icecc-create-env"
result=os.popen("%s %s %s %s %s %s" %(cr_env_script,
"--silent",
os.popen("%s gcc" % "which").read()[:-1],
@@ -290,9 +294,9 @@ def check_for_kernel(bb,d):
set_icecc_env() {
- ICECC_PATH=${@icc_path(bb,d)}
- if test x${ICECC_PATH} != x; then
- export PATH=${ICECC_PATH}$PATH
+ ICE_PATH=${@icc_path(bb,d)}
+ if test x${ICE_PATH} != x; then
+ export PATH=${ICE_PATH}$PATH
export CCACHE_PATH=$PATH
#check if we are building a kernel and select gcc-cross-kernel
if [ "${@check_for_kernel(bb,d)}" = "yes" ]; then
diff --git a/classes/image.bbclass b/classes/image.bbclass
index c493c73c01..fd0df4df08 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -2,11 +2,31 @@ inherit rootfs_${IMAGE_PKGTYPE}
LICENSE = "MIT"
PACKAGES = ""
-RDEPENDS += "${IMAGE_INSTALL}"
+
+#
+# udev, devfsd, busybox-mdev (from busybox) or none
+#
+IMAGE_DEV_MANAGER ?= "${@base_contains("MACHINE_FEATURES", "kernel26", "udev","",d)} "
+#
+# sysvinit, upstart
+#
+IMAGE_INIT_MANAGER ?= "sysvinit sysvinit-pidof"
+IMAGE_INITSCRIPTS ?= "initscripts"
+#
+# tinylogin, getty
+#
+IMAGE_LOGIN_MANAGER ?= "tinylogin"
+
+IMAGE_VARS = "${IMAGE_INITSCRIPTS} \
+${IMAGE_DEV_MANAGER} \
+${IMAGE_INIT_MANAGER} \
+${IMAGE_LOGIN_MANAGER} "
+
+RDEPENDS += "${IMAGE_INSTALL} ${IMAGE_VARS}"
# "export IMAGE_BASENAME" not supported at this time
IMAGE_BASENAME[export] = "1"
-export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}"
+export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${IMAGE_VARS}"
# We need to recursively follow RDEPENDS and RRECOMMENDS for images
do_rootfs[recrdeptask] += "do_deploy do_populate_staging"
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 3a2cadcaff..5b31a0123d 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -359,6 +359,8 @@ def package_qa_hash_style(path, name, d, elf):
elf = True
if "GNU_HASH" in line:
sane = True
+ if "[mips32]" in line or "[mips64]" in line:
+ sane = True
if elf and not sane:
error_msg = "No GNU_HASH in the elf binary: '%s'" % path
diff --git a/classes/java-native.bbclass b/classes/java-native.bbclass
new file mode 100644
index 0000000000..7b67c6041c
--- /dev/null
+++ b/classes/java-native.bbclass
@@ -0,0 +1,11 @@
+# This is to be used by recipes which rely on java-library.bbclass
+# infrastructure and are a *-native recipe which needs to install
+# jar files into staging.
+#
+# This class has nothing to do with Java's JNI.
+
+inherit native
+
+do_stage () {
+ java_stage
+}
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index d1f59e5e84..4c1dbda35c 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -74,9 +74,6 @@ UBOOT_ENTRYPOINT ?= "20008000"
UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
kernel_do_compile() {
- if [ ! -z "${INITRAMFS_IMAGE}" ]; then
- cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz" initramfs.cpio.gz
- fi
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
if [ "${KERNEL_MAJOR_VERSION}" != "2.6" ]; then
@@ -188,7 +185,10 @@ kernel_do_install() {
}
kernel_do_configure() {
- yes '' | oe_runmake oldconfig
+ yes '' | oe_runmake oldconfig
+ if [ ! -z "${INITRAMFS_IMAGE}" ]; then
+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz" initramfs.cpio.gz
+ fi
}
do_menuconfig() {
@@ -295,12 +295,14 @@ python populate_packages_prepend () {
def extract_modinfo(file):
import tempfile, os, re
tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1)
- tmpfile = tempfile.mkstemp()[1]
+ tf = tempfile.mkstemp()
+ tmpfile = tf[1]
cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
os.system(cmd)
f = open(tmpfile)
l = f.read().split("\000")
f.close()
+ os.close(tf[0])
os.unlink(tmpfile)
exp = re.compile("([^=]+)=(.*)")
vals = {}
diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass
index 63e6569799..3316e20c80 100644
--- a/classes/module_strip.bbclass
+++ b/classes/module_strip.bbclass
@@ -3,7 +3,11 @@
do_strip_modules () {
for p in ${PACKAGES}; do
if test -e ${WORKDIR}/install/$p/lib/modules; then
- modules="`find ${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`"
+ if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then
+ modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.ko`"
+ else
+ modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.o`"
+ fi
if [ -n "$modules" ]; then
for module in $modules ; do
if ! [ -d "$module" ] ; then
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 4f3856ccf5..69231e0b6b 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -82,14 +82,11 @@ export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
do_stage () {
if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
then
- if [ "${JAVA_NATIVE_STAGE_INSTALL}" = "1" ]
+ if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ]
then
- java_stage
- elif [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" = "1" ]
- then
- autotools_stage_all
- else
oe_runmake install
+ else
+ autotools_stage_all
fi
fi
}
diff --git a/classes/package.bbclass b/classes/package.bbclass
index a7cdb5f2d5..55595928c6 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -293,16 +293,6 @@ python package_do_split_locales() {
bb.data.setVar('DESCRIPTION_' + pkg, '%s translation for %s' % (l, pn), d)
bb.data.setVar('PACKAGES', ' '.join(packages), d)
-
- # Disabled by RP 18/06/07
- # Wildcards aren't supported in debian
- # They break with ipkg since glibc-locale* will mean that
- # glibc-localedata-translit* won't install as a dependency
- # for some other package which breaks meta-toolchain
- # Probably breaks since virtual-locale- isn't provided anywhere
- #rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "").split()
- #rdep.append('%s-locale*' % pn)
- #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
}
python populate_packages () {
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 6d4abaf5d0..5127d32f33 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -1,5 +1,5 @@
#
-# Copyright 2006-2007 OpenedHand Ltd.
+# Copyright 2006-2008 OpenedHand Ltd.
#
inherit package
@@ -88,13 +88,20 @@ python do_package_deb () {
return
bb.mkdirhier(dvar)
+ packages = bb.data.getVar('PACKAGES', d, 1)
+ if not packages:
+ bb.debug(1, "PACKAGES not defined, nothing to package")
+ return
tmpdir = bb.data.getVar('TMPDIR', d, 1)
if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"))
- packages = bb.data.getVar('PACKAGES', d, 1)
+ if packages == []:
+ bb.debug(1, "No packages; nothing to do")
+ return
+
for pkg in packages.split():
localdata = bb.data.createCopy(d)
pkgdest = bb.data.getVar('PKGDEST', d, 1)
@@ -242,17 +249,7 @@ python do_package_deb () {
bb.utils.unlockfile(lf)
raise bb.build.FuncFailed("dpkg-deb execution failed")
- for script in ["preinst", "postinst", "prerm", "postrm", "control" ]:
- scriptfile = os.path.join(controldir, script)
- try:
- os.remove(scriptfile)
- except OSError:
- pass
- try:
- os.rmdir(controldir)
- except OSError:
- pass
-
+ bb.utils.prunedir(controldir)
bb.utils.unlockfile(lf)
}
@@ -266,13 +263,8 @@ python () {
}
python do_package_write_deb () {
- packages = bb.data.getVar('PACKAGES', d, True)
- if not packages:
- bb.debug(1, "No PACKAGES defined, nothing to package")
- return
-
- bb.build.exec_func("read_subpackage_metadata", d)
- bb.build.exec_func("do_package_deb", d)
+ 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 3a977291ff..d4cb3b62e2 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -244,6 +244,10 @@ python do_package_ipk () {
rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split()
rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split()
rconflicts = (bb.data.getVar("RCONFLICTS", localdata, 1) or "").split()
+
+ if not '-locale-' and not '-dbg' and not '-dev' in pkgname:
+ rdepends.append('%s-locale*' % pkgname)
+
if rdepends:
ctrlfile.write("Depends: %s\n" % ", ".join(rdepends))
if rsuggests:
@@ -293,16 +297,7 @@ python do_package_ipk () {
bb.utils.unlockfile(lf)
raise bb.build.FuncFailed("ipkg-build execution failed")
- for script in ["preinst", "postinst", "prerm", "postrm", "control" ]:
- scriptfile = os.path.join(controldir, script)
- try:
- os.remove(scriptfile)
- except OSError:
- pass
- try:
- os.rmdir(controldir)
- except OSError:
- pass
+ bb.utils.prunedir(controldir)
bb.utils.unlockfile(lf)
}
diff --git a/classes/qt4e.bbclass b/classes/qt4e.bbclass
new file mode 100644
index 0000000000..8beef29df4
--- /dev/null
+++ b/classes/qt4e.bbclass
@@ -0,0 +1,15 @@
+DEPENDS_prepend = "${@["qt-embedded ", ""][(bb.data.getVar('PN', d, 1) == 'qt-embedded')]}"
+inherit qmake2
+
+QT_DIR_NAME = "qtopia"
+# override variables set by qmake-base to compile Qt/Embedded apps
+#
+export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qtopia"
+export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
+export OE_QMAKE_LIBS_QT = "qt"
+export OE_QMAKE_LIBS_X11 = ""
+export OE_QMAKE_EXTRA_MODULES = "network"
+EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=E "
+
+# Qt4 uses atomic instructions not supported in thumb mode
+ARM_INSTRUCTION_SET = "arm"
diff --git a/classes/qt4x11.bbclass b/classes/qt4x11.bbclass
index 76a45c33cb..923717f8af 100644
--- a/classes/qt4x11.bbclass
+++ b/classes/qt4x11.bbclass
@@ -1,3 +1,6 @@
DEPENDS_prepend = "${@["qt4x11 ", ""][(bb.data.getVar('PN', d, 1) == 'qt4-x11-free')]}"
inherit qmake2
+
+# Qt4 uses atomic instructions not supported in thumb mode
+ARM_INSTRUCTION_SET = "arm"
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 1b93767463..2768c2afb2 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -1,6 +1,8 @@
#
# Copyright 2006-2007 Openedhand Ltd.
#
+ROOTFS_PKGMANAGE = "run-postinsts dpkg"
+ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging"
do_rootfs[recrdeptask] += "do_package_write_deb"
@@ -14,7 +16,7 @@ fakeroot rootfs_deb_do_rootfs () {
rm -f ${STAGING_ETCDIR_NATIVE}/apt/preferences
> ${IMAGE_ROOTFS}/var/dpkg/status
> ${IMAGE_ROOTFS}/var/dpkg/available
- # > ${STAGING_DIR}/var/dpkg/status
+ mkdir -p ${IMAGE_ROOTFS}/var/dpkg/alternatives
priority=1
for arch in ${PACKAGE_ARCHS}; do
@@ -39,16 +41,14 @@ fakeroot rootfs_deb_do_rootfs () {
tac ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev > ${STAGING_ETCDIR_NATIVE}/apt/sources.list
cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \
- | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \
+ | sed -e 's#Architecture ".*";#Architecture "${DPKG_ARCH}";#' \
> "${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf"
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
-
- mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
+ export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
apt-get update
@@ -80,12 +80,20 @@ fakeroot rootfs_deb_do_rootfs () {
if [ $? -ne 0 ]; then
exit 1
fi
- find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do
- mv $i `echo $i | sed -e's,\.dpkg-new$,,'`
- done
done
fi
+ rm ${WORKDIR}/temp/log.do_$target-attemptonly.${PID}
+ if [ ! -z "${PACKAGE_INSTALL_ATTEMPTONLY}" ]; then
+ for i in ${PACKAGE_INSTALL_ATTEMPTONLY}; do
+ apt-get install $i --force-yes --allow-unauthenticated >> ${WORKDIR}/temp/log.do_rootfs-attemptonly.${PID} || true
+ done
+ fi
+
+ find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do
+ mv $i `echo $i | sed -e's,\.dpkg-new$,,'`
+ done
+
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
@@ -110,22 +118,14 @@ fakeroot rootfs_deb_do_rootfs () {
set -e
- # Hacks to make dpkg/opkg coexist for now
- mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/
- if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
- rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ # Hacks to allow opkg's update-alternatives and opkg to coexist for now
+ mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg
+ if [ -e ${IMAGE_ROOTFS}/var/dpkg/alternatives ]; then
+ rmdir ${IMAGE_ROOTFS}/var/dpkg/alternatives
fi
- if [ ! -e ${IMAGE_ROOTFS}${libdir}/opkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg
- fi
-
- if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/opkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg
- fi
-
- ln -sf ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
- ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/opkg/info
- ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/opkg/status
+ ln -s ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/var/dpkg/alternatives
+ ln -s /var/dpkg/info ${IMAGE_ROOTFS}${libdir}/opkg/info
+ ln -s /var/dpkg/status ${IMAGE_ROOTFS}${libdir}/opkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -142,7 +142,7 @@ rootfs_deb_log_check() {
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
- printf "log_check: Matched keyword: [$keyword_die]\n"
+ 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
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index e752449305..f5714bd1a3 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -21,7 +21,10 @@ ONLINE_PACKAGE_MANAGEMENT ?= "full"
# Which packages to not install on the basis of a recommendation
BAD_RECOMMENDATIONS ?= ""
-DISTRO_EXTRA_RDEPENDS += "${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "opkg opkg-collateral", d)}"
+IPKG_VARIANT ?= "opkg"
+
+RDEPENDS_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "${IPKG_VARIANT} opkg-collateral", d)}"
+PACKAGE_INSTALL_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "${IPKG_VARIANT} opkg-collateral", d)}"
fakeroot rootfs_ipk_do_rootfs () {
set -x
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index e442bf1807..29624c3f78 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -112,6 +112,12 @@ def check_sanity(e):
missing = missing.rstrip(',')
messages = messages + "Please install following missing utilities: %s\n" % missing
+ try:
+ if os.path.basename(os.readlink('/bin/sh')) == 'dash':
+ messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead.\n"
+ except:
+ pass
+
omask = os.umask(022)
if omask & 0755:
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"