rootfs_ipk: allow do_populate_sdk in parallel to do_rootfs

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.

(From OE-Core rev: 8c210407d07483075a70c8b97ad52b5eae062c9c)

Signed-off-by: Michael Ho <Michael.Ho@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Ho 2021-01-11 13:45:23 +01:00 committed by Richard Purdie
parent 39ac141eb6
commit 2fa0b3278c
3 changed files with 9 additions and 2 deletions

View File

@ -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"

View File

@ -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 = ""

View File

@ -14,6 +14,12 @@ class PkgSdk(Sdk):
def __init__(self, d, manifest_dir=None):
super(PkgSdk, self).__init__(d, manifest_dir)
# In sdk_list_installed_packages the call to opkg is hardcoded to
# always use IPKGCONF_TARGET and there's no exposed API to change this
# so simply override IPKGCONF_TARGET to use this separated config file.
ipkgconf_sdk_target = d.getVar("IPKGCONF_SDK_TARGET")
d.setVar("IPKGCONF_TARGET", ipkgconf_sdk_target)
self.target_conf = self.d.getVar("IPKGCONF_TARGET")
self.host_conf = self.d.getVar("IPKGCONF_SDK")