From 1a7cff6077b770083062952ef6f6f7517bfd2c07 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 18 Apr 2007 21:22:03 +0000 Subject: classes: Add support for intertask dependencies to be specified, needed for correct operation with bitbake 1.8.x. Old behaviour is maintained in a special legacy anonymous function in base.bbclass. The patch is an improved version of the one discussed on the mailing list. --- classes/package.bbclass | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'classes/package.bbclass') diff --git a/classes/package.bbclass b/classes/package.bbclass index 3e80b2b31c..e044395347 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -116,8 +116,23 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst bb.data.setVar('PACKAGES', ' '.join(packages), d) -PACKAGE_DEPENDS ?= "file-native fakeroot-native" -DEPENDS_prepend =+ "${PACKAGE_DEPENDS} " +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) +} + # 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! @@ -126,7 +141,7 @@ 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 PACKAGES_DEPENDS + # is necessary for this stuff to work, hence the addition to do_package[depends] local ro st -- cgit v1.2.3