api: rewrite breakpad and add debug symbols
Breakpad symbols were named wrong, referring to DEBUG symbols. We
translate the existing DEBUG to BREAKPAD_DEBUG and we correct them.
In addition we intro a new model for the global Get function to call
the individual handlers. Finally, DEBUG is also implemented.
BUG=b:185593007
TEST=call_scripts && units
Change-Id: I9f080c1261387e74ceb177a9994186883b57a347
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2959731
Tested-by: George Engelbrecht <engeg@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
diff --git a/api/controller/controller_util.py b/api/controller/controller_util.py
index 4a39f93..c86dd85 100644
--- a/api/controller/controller_util.py
+++ b/api/controller/controller_util.py
@@ -11,7 +11,7 @@
from chromite.lib import constants
from chromite.lib.parser import package_info
from chromite.lib.chroot_lib import Chroot
-
+from chromite.lib.sysroot_lib import Sysroot
class Error(Exception):
"""Base error class for the module."""
@@ -58,6 +58,24 @@
return chroot
+
+def ParseSysroot(sysroot_message):
+ """Create a sysroot object from the sysroot message.
+
+ Args:
+ sysroot_message (commmon_pb2.Sysroot): The sysroot message.
+
+ Returns:
+ Sysroot: The parsed sysroot object.
+
+ Raises:
+ AssertionError: When the message is not a Sysroot message.
+ """
+ assert isinstance(sysroot_message, sysroot_pb2.Sysroot)
+
+ return Sysroot(sysroot_message.path)
+
+
def ParseGomaConfig(goma_message, chroot_path):
"""Parse a goma config message."""
assert isinstance(goma_message, common_pb2.GomaConfig)