From 8ec9b41e85884e3d67f13d01fcfa8511688c8eb9 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Thu, 6 Feb 2025 17:02:32 +0100 Subject: [PATCH] [Tizen] Fix race when storing cert credentials (#37427) --- integrations/docker/images/base/chip-build/version | 2 +- .../chip-build-tizen/tizen-sdk-installer/secret-tool.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index d69741af1bd3f2..b0158daf675e10 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -108 : Update vscode docker with java17 and fix java_home in java docker +109 : [Tizen] Fix race when storing cert credentials diff --git a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py index c6807ab9a6c968..e94ae54c778bb4 100755 --- a/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py +++ b/integrations/docker/images/stage-2/chip-build-tizen/tizen-sdk-installer/secret-tool.py @@ -61,6 +61,7 @@ def _save(self): self.fp.seek(0) self.fp.truncate() pickle.dump(self.secrets, self.fp) + self.fp.flush() except IOError as e: print("ERROR: " + str(e), file=sys.stderr) @@ -92,14 +93,14 @@ def lookup(self, label: str, **kw): subparsers = parser.add_subparsers(dest='command', required=True) parser_clear = subparsers.add_parser( - "clear", help="Remove passward associated with given key value pairs") + "clear", help="Remove password associated with given key value pairs") parser_clear.add_argument("-l", "--label", action='store', required=True, help="label for given key value pairs") parser_clear.add_argument("kw", nargs='*', help="key value pairs") parser_store = subparsers.add_parser( - "store", help="Store passward for given key value pairs") + "store", help="Store password for given key value pairs") parser_store.add_argument("-l", "--label", action='store', required=True, help="label for given key value pairs") parser_store.add_argument("-p", "--password", action='store', required=True, @@ -108,7 +109,7 @@ def lookup(self, label: str, **kw): help="key value pairs") parser_lookup = subparsers.add_parser( - "lookup", help="Retrieve passward associated with given key value pairs") + "lookup", help="Retrieve password associated with given key value pairs") parser_lookup.add_argument("-l", "--label", action='store', required=True, help="label for given key value pairs") parser_lookup.add_argument("kw", nargs='*',