summaryrefslogtreecommitdiff
path: root/poky/meta-selftest/classes/localpkgfeed.bbclass
blob: b796375e55cf669e36d462373fbc3483591c7e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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)
}