All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] scripts/oe-debuginfod: correct several issues
@ 2021-04-19  9:00 Alexander Kanavin
  2021-04-19  9:00 ` [PATCH 2/4] libmicrohttpd: add a recipe from meta-oe Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alexander Kanavin @ 2021-04-19  9:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Particularly:
- nesting subprocess.run() inside subprocess.check_output() does not work at all.
How was this tested?
- -R and -U options can be combined; no need to separate the invocations based
on packaging format
- both exception handlers are unnecessary; we can simply print the hint if
invocation did not succeed
- to run debuginfod from its own sysroot, '-c addto_recipe_sysroot' for elfutils-native
must be executed

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 scripts/oe-debuginfod | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/scripts/oe-debuginfod b/scripts/oe-debuginfod
index 967dd5807c..5560769888 100755
--- a/scripts/oe-debuginfod
+++ b/scripts/oe-debuginfod
@@ -20,12 +20,7 @@ if __name__ == "__main__":
         package_classes_var = "DEPLOY_DIR_" + tinfoil.config_data.getVar("PACKAGE_CLASSES").split()[0].replace("package_", "").upper()
         feed_dir = tinfoil.config_data.getVar(package_classes_var, expand=True)
 
-    try:
-        if package_classes_var == "DEPLOY_DIR_RPM":
-            subprocess.check_output(subprocess.run(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', feed_dir]))
-        else:
-            subprocess.check_output(subprocess.run(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-U', feed_dir]))
-    except subprocess.CalledProcessError:
-        print("\nTo use the debuginfod server Please ensure that this variable PACKAGECONFIG_pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
-    except KeyboardInterrupt:
-            sys.exit(1)
+    subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
+
+    subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
+    print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG_pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-20 12:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19  9:00 [PATCH 1/4] scripts/oe-debuginfod: correct several issues Alexander Kanavin
2021-04-19  9:00 ` [PATCH 2/4] libmicrohttpd: add a recipe from meta-oe Alexander Kanavin
2021-04-19 15:45   ` [OE-core] " Khem Raj
2021-04-20 12:07     ` Alexander Kanavin
2021-04-19  9:00 ` [PATCH 3/4] default-distrovars.inc: add debuginfod to default DISTRO_FEATURES Alexander Kanavin
2021-04-19 15:41   ` [OE-core] " Richard Purdie
     [not found]   ` <16774CB2FBD0E460.32333@lists.openembedded.org>
2021-04-19 20:42     ` Richard Purdie
2021-04-20 12:06       ` Alexander Kanavin
2021-04-19  9:00 ` [PATCH 4/4] dev-manual/common-tasks.rst: correct the documentation for debuginfod Alexander Kanavin
2021-04-19 10:11   ` [OE-core] " Richard Purdie
2021-04-19 10:33     ` [docs] " Quentin Schulz
2021-04-19 12:39       ` Alexander Kanavin
2021-04-19 12:52         ` Quentin Schulz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.