mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00

This class can be used to construct a subset of a deployed package feed for use in tests which iterate the deploy directory, and as such a huge feed of 30K+ packages can result in very slow tests. (From OE-Core rev: c5486d6ad32457f09c104d5dd31314bd570912d3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
28 lines
842 B
Plaintext
28 lines
842 B
Plaintext
# Create a subset of the package feed that just contain the
|
|
# packages depended on by this recipe.
|
|
|
|
LOCALPKGFEED_DIR = "${WORKDIR}/localpkgfeed"
|
|
|
|
addtask localpkgfeed after do_build
|
|
do_localpkgfeed[cleandirs] = "${LOCALPKGFEED_DIR}"
|
|
do_localpkgfeed[nostamp] = "1"
|
|
|
|
def get_packaging_class(d):
|
|
package_class = d.getVar("PACKAGE_CLASSES").split()[0]
|
|
return package_class.replace("package_", "")
|
|
|
|
python () {
|
|
packaging = get_packaging_class(d)
|
|
d.setVarFlag("do_localpkgfeed", "rdeptask", "do_package_write_" + packaging)
|
|
}
|
|
|
|
python do_localpkgfeed() {
|
|
import oe.package_manager
|
|
|
|
packaging = get_packaging_class(d)
|
|
deploydir = d.getVar("DEPLOY_DIR_" + packaging.upper())
|
|
task = "package_write_" + packaging
|
|
|
|
oe.package_manager.create_packages_dir(d, d.getVar("LOCALPKGFEED_DIR"), deploydir, task, True, True)
|
|
}
|