oe-debuginfod 974 B

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