rootfs_ipk: allow do_populate_sdk in parallel to do_rootfs
PATCH 1/1 rootfs_ipk: allow do_populate_sdk in parallel to do_rootfs
From: Michael Ho <[email protected]>
Switch do_populate_sdk for the ipk package manager to use a separate target opkg config file and separate the lockfiles restricting do_rootfs and do_populate_sdk from running in parallel.
This way if an image recipe includes a dependency to do_populate_sdk by default then it will run in parallel to do_rootfs saving time compared to the sequential execution.
--- meta/classes/package_ipk.bbclass | 1 + meta/classes/rootfs_ipk.bbclass | 4 ++-- meta/lib/oe/sdk.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-)
meta/classes/package_ipk.bbclass +1 -0
@@ -4,6 +4,7 @@ IMAGE_PKGTYPE ?= "ipk" IPKGCONF_TARGET = "${WORKDIR}/opkg.conf" IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" +IPKGCONF_SDK_TARGET = "${WORKDIR}/opkg-sdk-target.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
meta/classes/rootfs_ipk.bbclass +2 -2
@@ -14,8 +14,8 @@ do_rootfs[recrdeptask] += "do_package_write_ipk do_package_qa" do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock" -do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock" -do_populate_sdk_ext[lockfiles] += "${WORKDIR}/ipk.lock" +do_populate_sdk[lockfiles] += "${WORKDIR}/sdk-ipk.lock" +do_populate_sdk_ext[lockfiles] += "${WORKDIR}/sdk-ipk.lock" OPKG_PREPROCESS_COMMANDS = ""
meta/lib/oe/sdk.py +2 -2
@@ -219,7 +219,7 @@ class OpkgSdk(Sdk): def __init__(self, d, manifest_dir=None): super(OpkgSdk, self).__init__(d, manifest_dir) - self.target_conf = self.d.getVar("IPKGCONF_TARGET") + self.target_conf = self.d.getVar("IPKGCONF_SDK_TARGET") self.host_conf = self.d.getVar("IPKGCONF_SDK") self.target_manifest = OpkgManifest(d, self.manifest_dir,
@@ -400,7 +400,7 @@ def sdk_list_installed_packages(d, target, rootfs_dir=None): os_var = ["SDK_OS", None][target is True] return RpmPkgsList(d, rootfs_dir).list_pkgs() elif img_type == "ipk": - conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True] + conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_SDK_TARGET"][target is True] return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var)).list_pkgs() elif img_type == "deb": return DpkgPkgsList(d, rootfs_dir).list_pkgs()
Signature · 1 line
2.7.4
Quoted 10 lines · Michael Ho
From: Michael Ho <[email protected]>
Switch
do_populate_sdkfor the ipk package manager to use a separate target opkg config file and separate the lockfiles restrictingdo_rootfsanddo_populate_sdkfrom running in parallel.This way if an image recipe includes a dependency to
do_populate_sdkby default then it will run in parallel todo_rootfssaving time compared to the sequential execution.
Quoted 6 lines
Signed-off-by Michael Ho <[email protected]>---
meta/classes/package_ipk.bbclass | 1 + meta/classes/rootfs_ipk.bbclass | 4 ++-- meta/lib/oe/sdk.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-)
Personally, I don't think this is a potentially problematic backport candidate as we don't even know it works in master and it exposes dunfell to lots of potential races...
Cheers,
Richard