summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 16:49:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-20 11:53:49 +0000
commitbc7162a46cebfec3896f95081bc2f635efa509f2 (patch)
tree185862333fc0c9980c20fae590dd6f953310960c /meta/classes
parenteeb30764e9ac712dd2512aedecb6b5e53eafd9c2 (diff)
downloadpoky-bc7162a46cebfec3896f95081bc2f635efa509f2.tar.gz
classes/package*: Add support for PACKAGE_WRITE_DEPS
Add a new variable to allow markup of postinstall (and preinst) script dependnecies on native/cross tools. If your postinstall can execute at rootfs creation time rather than on target but depends on a native tool in order to execute, you need to list that tool in PACKAGE_WRITE_DEPENDS. (From OE-Core rev: aff8ca95b8303a4a2a5600c0d8ec0a50ad677258) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass8
-rw-r--r--meta/classes/package_deb.bbclass1
-rw-r--r--meta/classes/package_ipk.bbclass1
-rw-r--r--meta/classes/package_rpm.bbclass1
4 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 568b85c12a..0068a50258 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -54,6 +54,14 @@ ALL_MULTILIB_PACKAGE_ARCHS = "${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}"
54# rpm is used for the per-file dependency identification 54# rpm is used for the per-file dependency identification
55PACKAGE_DEPENDS += "rpm-native" 55PACKAGE_DEPENDS += "rpm-native"
56 56
57
58# If your postinstall can execute at rootfs creation time rather than on
59# target but depends on a native/cross tool in order to execute, you need to
60# list that tool in PACKAGE_WRITE_DEPENDS. Target package dependencies belong
61# in the package dependencies as normal, this is just for native/cross support
62# tools at rootfs build time.
63PACKAGE_WRITE_DEPS ??= ""
64
57def legitimize_package_name(s): 65def legitimize_package_name(s):
58 """ 66 """
59 Make sure package names are legitimate strings 67 Make sure package names are legitimate strings
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 68eca61a26..6ce008f1ac 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -351,6 +351,7 @@ python do_package_write_deb () {
351do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}" 351do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
352do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}" 352do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}"
353do_package_write_deb[umask] = "022" 353do_package_write_deb[umask] = "022"
354do_package_write_deb[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
354addtask package_write_deb after do_packagedata do_package 355addtask package_write_deb after do_packagedata do_package
355 356
356 357
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 7018a600a9..039b6ab69b 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -291,6 +291,7 @@ python do_package_write_ipk () {
291do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}" 291do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
292do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}" 292do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
293do_package_write_ipk[umask] = "022" 293do_package_write_ipk[umask] = "022"
294do_package_write_ipk[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
294addtask package_write_ipk after do_packagedata do_package 295addtask package_write_ipk after do_packagedata do_package
295 296
296PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" 297PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b9f049e4b2..c978ec55d0 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -772,6 +772,7 @@ python do_package_write_rpm () {
772do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}" 772do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
773do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}" 773do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
774do_package_write_rpm[umask] = "022" 774do_package_write_rpm[umask] = "022"
775do_package_write_rpm[depends] += "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'), 'do_populate_sysroot')}"
775addtask package_write_rpm after do_packagedata do_package 776addtask package_write_rpm after do_packagedata do_package
776 777
777PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" 778PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"