Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion xbstrap/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,12 @@ def patch_src(cfg, src):
["hg", "import", os.path.join(src.patch_dir, patch)], cwd=src.source_dir
)
elif "url" in source:
path_strip = str(source["patch-path-strip"]) if "patch-path-strip" in source else "0"
path_strip = "0"
if "patch_path_strip" in source:
path_strip = str(source["patch_path_strip"])
elif "patch-path-strip" in source: # Accept old spelling
path_strip = str(source["patch-path-strip"])

with open(os.path.join(src.patch_dir, patch), "r") as fd:
subprocess.check_call(
["patch", "-p", path_strip, "--merge"], stdin=fd, cwd=src.source_dir
Expand Down
2 changes: 2 additions & 0 deletions xbstrap/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ definitions:
type: string
'patch-path-strip':
type: integer
'patch_path_strip':
type: integer
'checksum':
type: string
# VCS sources.
Expand Down
Loading