localpkgfeed.bbclass 842 B

123456789101112131415161718192021222324252627
  1. # Create a subset of the package feed that just contain the
  2. # packages depended on by this recipe.
  3. LOCALPKGFEED_DIR = "${WORKDIR}/localpkgfeed"
  4. addtask localpkgfeed after do_build
  5. do_localpkgfeed[cleandirs] = "${LOCALPKGFEED_DIR}"
  6. do_localpkgfeed[nostamp] = "1"
  7. def get_packaging_class(d):
  8. package_class = d.getVar("PACKAGE_CLASSES").split()[0]
  9. return package_class.replace("package_", "")
  10. python () {
  11. packaging = get_packaging_class(d)
  12. d.setVarFlag("do_localpkgfeed", "rdeptask", "do_package_write_" + packaging)
  13. }
  14. python do_localpkgfeed() {
  15. import oe.package_manager
  16. packaging = get_packaging_class(d)
  17. deploydir = d.getVar("DEPLOY_DIR_" + packaging.upper())
  18. task = "package_write_" + packaging
  19. oe.package_manager.create_packages_dir(d, d.getVar("LOCALPKGFEED_DIR"), deploydir, task, True, True)
  20. }