build: allow empty .patches files (#53978)

* build: allow empty .patches files

* chore: drop obsolete patch directory
This commit is contained in:
David Sanders authored and GitHub committed 2026-09-16 09:39:59 -07:00
1 parent 8e0f794912
commit 1212a7b0a7
6 files changed
+11 -2

No files matched your search

View File
Whitespace-only changes.
+4 -1
View File
@@ -1,12 +1,15 @@
[
{ "patch_dir": "src/electron/patches/chromium", "repo": "src" },
{ "patch_dir": "src/electron/patches/boringssl", "repo": "src/third_party/boringssl/src" },
{ "patch_dir": "src/electron/patches/devtools_frontend", "repo": "src/third_party/devtools-frontend/src" },
{ "patch_dir": "src/electron/patches/ffmpeg", "repo": "src/third_party/ffmpeg" },
{ "patch_dir": "src/electron/patches/v8", "repo": "src/v8" },
{ "patch_dir": "src/electron/patches/node", "repo": "src/third_party/electron_node" },
{ "patch_dir": "src/electron/patches/nan", "repo": "src/third_party/nan" },
{ "patch_dir": "src/electron/patches/libaddressinput", "repo": "src/third_party/libaddressinput/src" },
{ "patch_dir": "src/electron/patches/perfetto", "repo": "src/third_party/perfetto" },
{ "patch_dir": "src/electron/patches/squirrel.mac", "repo": "src/third_party/squirrel.mac" },
{ "patch_dir": "src/electron/patches/webrtc", "repo": "src/third_party/webrtc" },
{ "patch_dir": "src/electron/patches/sqlite", "repo": "src/third_party/sqlite/src" }
{ "patch_dir": "src/electron/patches/sqlite", "repo": "src/third_party/sqlite/src" },
{ "patch_dir": "src/electron/patches/angle", "repo": "src/third_party/angle" }
]
View File
Whitespace-only changes.
View File
Whitespace-only changes.
+5
View File
@@ -62,6 +62,11 @@ def get_repo_root(path):
def am(repo, patch_data, threeway=False, directory=None, exclude=None,
committer_name=None, committer_email=None, keep_cr=True,
output_prefix=None):
if not patch_data:
sys.stderr.write(
f'{output_prefix or ""}No patches to apply in {repo}\n'
)
return
# --keep-non-patch prevents stripping leading bracketed strings on the subject line
args = ['--keep-non-patch']
if threeway:
+2 -1
View File
@@ -225,7 +225,8 @@ const LINTERS = [
}
// Read the patch list
const patchFileList = fs.readFileSync(dotPatchesPath, 'utf8').trim().split('\n');
const patchList = fs.readFileSync(dotPatchesPath, 'utf8').trim();
const patchFileList = patchList ? patchList.split('\n') : [];
const patchFileSet = new Set(patchFileList);
patchFileList.reduce((seen, file) => {
if (seen.has(file)) {