oe-debuginfod 1014 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python3
  2. #
  3. # Copyright OpenEmbedded Contributors
  4. #
  5. # SPDX-License-Identifier: MIT
  6. #
  7. import os
  8. import sys
  9. scripts_path = os.path.dirname(os.path.realpath(__file__))
  10. lib_path = scripts_path + "/lib"
  11. sys.path.insert(0, lib_path)
  12. import scriptpath
  13. scriptpath.add_bitbake_lib_path()
  14. import bb.tinfoil
  15. import subprocess
  16. if __name__ == "__main__":
  17. with bb.tinfoil.Tinfoil() as tinfoil:
  18. tinfoil.prepare(config_only=True)
  19. package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper()
  20. feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True)
  21. subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
  22. subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
  23. print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")