classes: Rework core dependencies to work properly at the task level
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1427 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
bd0ca262c9
commit
409335beae
|
@ -12,12 +12,6 @@ def base_dep_prepend(d):
|
||||||
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
|
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
|
||||||
# we need that built is the responsibility of the patch function / class, not
|
# we need that built is the responsibility of the patch function / class, not
|
||||||
# the application.
|
# the application.
|
||||||
patchdeps = bb.data.getVar("PATCHTOOL", d, 1)
|
|
||||||
if patchdeps:
|
|
||||||
patchdeps = "%s-native" % patchdeps
|
|
||||||
if not patchdeps in bb.data.getVar("PROVIDES", d, 1):
|
|
||||||
deps = patchdeps
|
|
||||||
|
|
||||||
if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
|
if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
|
||||||
if (bb.data.getVar('HOST_SYS', d, 1) !=
|
if (bb.data.getVar('HOST_SYS', d, 1) !=
|
||||||
bb.data.getVar('BUILD_SYS', d, 1)):
|
bb.data.getVar('BUILD_SYS', d, 1)):
|
||||||
|
|
|
@ -13,19 +13,21 @@ USE_DEVFS ?= "0"
|
||||||
|
|
||||||
PID = "${@os.getpid()}"
|
PID = "${@os.getpid()}"
|
||||||
|
|
||||||
DEPENDS += "makedevs-native"
|
|
||||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||||
|
|
||||||
def get_image_deps(d):
|
do_rootfs[depends] += "makedevs-native:do_populate_staging fakeroot-native:do_populate_staging"
|
||||||
import bb
|
|
||||||
str = ""
|
|
||||||
for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split():
|
|
||||||
deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or ""
|
|
||||||
if deps:
|
|
||||||
str += " %s" % deps
|
|
||||||
return str
|
|
||||||
|
|
||||||
DEPENDS += "${@get_image_deps(d)}"
|
python () {
|
||||||
|
import bb
|
||||||
|
|
||||||
|
deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or ""
|
||||||
|
for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split():
|
||||||
|
for dep in ((bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "").split() or []):
|
||||||
|
deps += " %s:do_populate_staging" % dep
|
||||||
|
for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, 1) or "").split():
|
||||||
|
deps += " %s:do_populate_staging" % dep
|
||||||
|
bb.data.setVarFlag('do_rootfs', 'depends', deps, d)
|
||||||
|
}
|
||||||
|
|
||||||
IMAGE_DEVICE_TABLE ?= "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}"
|
IMAGE_DEVICE_TABLE ?= "${@bb.which(bb.data.getVar('BBPATH', d, 1), 'files/device_table-minimal.txt')}"
|
||||||
IMAGE_POSTPROCESS_COMMAND ?= ""
|
IMAGE_POSTPROCESS_COMMAND ?= ""
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
# We play a special package function
|
# We play a special package function
|
||||||
inherit package
|
inherit package
|
||||||
PACKAGE_DEPENDS += "pax-utils-native"
|
do_package[depends] += "pax-utils-native:do_populate_staging"
|
||||||
PACKAGEFUNCS += " do_package_qa "
|
PACKAGEFUNCS += " do_package_qa "
|
||||||
|
|
||||||
def package_qa_check_rpath(file,name,d):
|
def package_qa_check_rpath(file,name,d):
|
||||||
|
|
|
@ -116,8 +116,18 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
|
||||||
|
|
||||||
bb.data.setVar('PACKAGES', ' '.join(packages), d)
|
bb.data.setVar('PACKAGES', ' '.join(packages), d)
|
||||||
|
|
||||||
PACKAGE_DEPENDS ?= "file-native fakeroot-native"
|
do_package[depends] = "file-native:do_populate_staging"
|
||||||
DEPENDS_prepend =+ "${PACKAGE_DEPENDS} "
|
|
||||||
|
python () {
|
||||||
|
import bb
|
||||||
|
|
||||||
|
if bb.data.getVar('PACKAGES', d, 1) != '':
|
||||||
|
deps = bb.data.getVarFlag('do_package_write', 'depends', d) or ""
|
||||||
|
for dep in (bb.data.getVar('PACKAGE_EXTRA_DEPENDS', d, 1) or "").split():
|
||||||
|
deps += " %s:do_populate_staging" % dep
|
||||||
|
bb.data.setVarFlag('do_package_write', 'depends', deps, d)
|
||||||
|
}
|
||||||
|
|
||||||
# file(1) output to match to consider a file an unstripped executable
|
# file(1) output to match to consider a file an unstripped executable
|
||||||
FILE_UNSTRIPPED_MATCH ?= "not stripped"
|
FILE_UNSTRIPPED_MATCH ?= "not stripped"
|
||||||
#FIXME: this should be "" when any errors are gone!
|
#FIXME: this should be "" when any errors are gone!
|
||||||
|
@ -126,7 +136,7 @@ IGNORE_STRIP_ERRORS ?= "1"
|
||||||
runstrip() {
|
runstrip() {
|
||||||
# Function to strip a single file, called from RUNSTRIP in populate_packages below
|
# Function to strip a single file, called from RUNSTRIP in populate_packages below
|
||||||
# A working 'file' (one which works on the target architecture)
|
# A working 'file' (one which works on the target architecture)
|
||||||
# is necessary for this stuff to work, hence the addition to PACKAGES_DEPENDS
|
# is necessary for this stuff to work, hence the addition to do_package[depends]
|
||||||
|
|
||||||
local ro st
|
local ro st
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
inherit package
|
inherit package
|
||||||
DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"
|
|
||||||
|
PACKAGE_EXTRA_DEPENDS += "dpkg-native fakeroot-native"
|
||||||
|
|
||||||
BOOTSTRAP_EXTRA_RDEPENDS += "dpkg"
|
BOOTSTRAP_EXTRA_RDEPENDS += "dpkg"
|
||||||
DISTRO_EXTRA_RDEPENDS += "dpkg"
|
DISTRO_EXTRA_RDEPENDS += "dpkg"
|
||||||
PACKAGE_WRITE_FUNCS += "do_package_deb"
|
PACKAGE_WRITE_FUNCS += "do_package_deb"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
inherit package
|
inherit package
|
||||||
DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}"
|
|
||||||
|
PACKAGE_EXTRA_DEPENDS += "ipkg-utils-native fakeroot-native"
|
||||||
|
|
||||||
BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
|
BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
|
||||||
DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
|
DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
|
||||||
PACKAGE_WRITE_FUNCS += "do_package_ipk"
|
PACKAGE_WRITE_FUNCS += "do_package_ipk"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
inherit package
|
inherit package
|
||||||
|
|
||||||
|
PACKAGE_EXTRA_DEPENDS += "tar-native"
|
||||||
|
|
||||||
PACKAGE_WRITE_FUNCS += "do_package_tar"
|
PACKAGE_WRITE_FUNCS += "do_package_tar"
|
||||||
IMAGE_PKGTYPE ?= "tar"
|
IMAGE_PKGTYPE ?= "tar"
|
||||||
|
|
||||||
|
|
|
@ -391,6 +391,8 @@ def patch_init(d):
|
||||||
|
|
||||||
addtask patch after do_unpack
|
addtask patch after do_unpack
|
||||||
do_patch[dirs] = "${WORKDIR}"
|
do_patch[dirs] = "${WORKDIR}"
|
||||||
|
do_patch[depends] = "${PATCHTOOL}-native:do_populate_staging"
|
||||||
|
|
||||||
python patch_do_patch() {
|
python patch_do_patch() {
|
||||||
import re
|
import re
|
||||||
import bb.fetch
|
import bb.fetch
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
DEPENDS_prepend = "dpkg-native apt-native fakeroot-native "
|
|
||||||
DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}"
|
do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging"
|
||||||
|
|
||||||
fakeroot rootfs_deb_do_rootfs () {
|
fakeroot rootfs_deb_do_rootfs () {
|
||||||
set +e
|
set +e
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
# See image.bbclass for a usage of this.
|
# See image.bbclass for a usage of this.
|
||||||
#
|
#
|
||||||
|
|
||||||
DEPENDS_prepend="ipkg-native ipkg-utils-native fakeroot-native "
|
do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
|
||||||
DEPENDS_append=" ${EXTRA_IMAGEDEPENDS}"
|
|
||||||
|
|
||||||
IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}"
|
IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue