From 145854e7dea85154c483954b0b5f8f0c96ef8bed Mon Sep 17 00:00:00 2001 From: Lilac Date: Sun, 24 Aug 2025 13:01:13 +0000 Subject: [PATCH] code-marketplace: auto updated to 1.102.1-2 It has been built because: * nvchecker detects the following updates: aur(0): 1.102.1-1 -> 1.102.1-2 --- repo/code-marketplace/PKGBUILD | 4 ++-- repo/code-marketplace/patch.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/repo/code-marketplace/PKGBUILD b/repo/code-marketplace/PKGBUILD index 53c4638..0102913 100644 --- a/repo/code-marketplace/PKGBUILD +++ b/repo/code-marketplace/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Sainnhe Park pkgname=code-marketplace pkgver=1.102.1 -pkgrel=1 +pkgrel=2 pkgdesc='Enable vscode marketplace in Code OSS' arch=('any') url='https://marketplace.visualstudio.com/vscode' @@ -13,7 +13,7 @@ source=('code-marketplace.hook' 'patch.py' 'patch.json') md5sums=('ce502275aa945985182b51420fc6037c' - '9ed6f3972479ab6d3d053e7c47ead55a' + '8ff44c81624f63e20884531715896ef3' '10c1c73ea3977afb9b8954e5e8407d6e') package() { diff --git a/repo/code-marketplace/patch.py b/repo/code-marketplace/patch.py index b4710b4..d220c2d 100755 --- a/repo/code-marketplace/patch.py +++ b/repo/code-marketplace/patch.py @@ -31,6 +31,33 @@ if not os.path.exists(cache_path): with open(cache_path, "w") as file: file.write("{}") +def fix_sign(undo=False): + """Fix the error of failed signature verification.""" + path = ( + "/usr/lib/code/out/vs/code/electron-utility/sharedProcess/sharedProcessMain.js" + ) + orig_text = 'import("node-ovsx-sign")' + fixed_text = 'import("@vscode/vsce-sign")' + if undo: + search_text = fixed_text + replace_text = orig_text + else: + search_text = orig_text + replace_text = fixed_text + try: + with open(path, "r", encoding="utf-8") as f: + content = f.read() + + if search_text not in content: + return + + new_content = content.replace(search_text, replace_text) + + with open(path, "w", encoding="utf-8") as f: + _ = f.write(new_content) + + except Exception as e: + print(f"[code-marketplace] ERROR: {e}") def patch(): with open(product_path, "r") as product_file: @@ -46,6 +73,7 @@ def patch(): json.dump(product_data, product_file, indent="\t") with open(cache_path, "w") as cache_file: json.dump(cache_data, cache_file, indent="\t") + fix_sign(False) def restore(): @@ -62,6 +90,7 @@ def restore(): product_data[key] = cache_data[key] with open(product_path, "w") as product_file: json.dump(product_data, product_file, indent="\t") + fix_sign(True) if operation == "patch":