summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass3
-rw-r--r--meta/classes/package.bbclass19
-rw-r--r--meta/classes/package_deb.bbclass17
-rw-r--r--meta/classes/package_ipk.bbclass16
-rw-r--r--meta/classes/package_rpm.bbclass18
-rw-r--r--meta/classes/package_tar.bbclass21
-rw-r--r--meta/classes/rootfs_deb.bbclass1
-rw-r--r--meta/classes/rootfs_ipk.bbclass1
8 files changed, 61 insertions, 35 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ec08017cd..517868ed3 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -8,8 +8,7 @@ export IMAGE_BASENAME = "${PN}"
export PACKAGE_INSTALL = "${IMAGE_INSTALL}"
# We need to recursively follow RDEPENDS and RRECOMMENDS for images
-BUILD_ALL_DEPS = "1"
-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"
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 6c25b0d7d..e1a7d91a9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -126,11 +126,6 @@ python () {
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)
}
@@ -902,19 +897,7 @@ 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)
-}
-do_package_write[dirs] = "${D}"
-addtask package_write before do_build after do_package
-
-
-EXPORT_FUNCTIONS do_package do_package_write
-
+EXPORT_FUNCTIONS do_package
#
# Helper functions for the package writing classes
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 9a8db4f8f..c5452475c 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/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 () {
@@ -248,3 +245,17 @@ python do_package_deb () {
pass
del localdata
}
+
+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_build after do_package
+
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 0cdd941f4..2c75cd183 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -1,10 +1,7 @@
inherit package
-PACKAGE_EXTRA_DEPENDS += "ipkg-utils-native fakeroot-native"
-
BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
DISTRO_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
-PACKAGE_WRITE_FUNCS += "do_package_ipk"
IMAGE_PKGTYPE ?= "ipk"
python package_ipk_fn () {
@@ -242,3 +239,16 @@ python do_package_ipk () {
pass
del localdata
}
+
+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_build after do_package
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 495579291..7fc5e8ea9 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/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/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 17216a86f..cb4c42b26 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/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,6 +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)
-# end stuff
- del localdata
}
+
+python () {
+ import bb
+ if bb.data.getVar('PACKAGES', d, True) != '':
+ bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d)
+}
+
+
+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/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 55dad6679..6d405d2f5 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -3,6 +3,7 @@
#
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
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 89c35ab85..c58b54774 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -6,6 +6,7 @@
#
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}"