summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-08-09 12:17:58 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-08-16 15:30:32 +0200
commite9812e49f3e2d8f8decb26e9a33d9160d199380d (patch)
tree4089f08317b5e0565acde66ebec3dc0a868929f9 /rules
parent7e4f5b993e70c160d7e177d8429a197215ddd1ed (diff)
downloadjustbuild-e9812e49f3e2d8f8decb26e9a33d9160d199380d.tar.gz
patch: Drop patch-part
... because it was using tool that are not part of coreutils. Using patch parts can still be done via patching patches.
Diffstat (limited to 'rules')
-rw-r--r--rules/patch/RULES68
1 files changed, 0 insertions, 68 deletions
diff --git a/rules/patch/RULES b/rules/patch/RULES
index b1ba95e3..4de3ddbe 100644
--- a/rules/patch/RULES
+++ b/rules/patch/RULES
@@ -1,18 +1,12 @@
{ "file":
{ "doc": ["Replace a file, logically in place, by a patched version"]
, "target_fields": ["src", "patch"]
- , "string_fields": ["patch-part"]
, "config_vars": ["PATCH", "ENV"]
, "field_doc":
{ "src":
[ "The single source file to patch, typically an explicit file reference."
]
, "patch": ["The patch to apply."]
- , "patch-part":
- [ "If the patch contains hunks for multiple files, only apply hunks for"
- , "the specified file path. Individual directory components are joined"
- , "with \"/\". Note that the patch must be provided in unified format."
- ]
}
, "artifacts_doc":
["The patched file, staged to the position the of the original file"]
@@ -36,68 +30,6 @@
, "body": {"type": "CALL_EXPRESSION", "name": "stage_field"}
}
]
- , [ "patch-part"
- , { "type": "join"
- , "separator": "\\/"
- , "$1": {"type": "FIELD", "name": "patch-part"}
- }
- ]
- , [ "splitpatch"
- , { "type": "BLOB"
- , "data":
- { "type": "join"
- , "separator": "\n"
- , "$1":
- [ "set -e"
- , { "type": "join"
- , "$1":
- [ { "type": "join_cmd"
- , "$1":
- [ "sed"
- , "-n"
- , { "type": "join"
- , "$1":
- [ "/^--- "
- , {"type": "var", "name": "patch-part"}
- , "/,"
- , "/^[^-+@\\ ]\\|^---\\ /p"
- ]
- }
- ]
- }
- , " $1 | sed '$d' > patch"
- ]
- }
- ]
- }
- }
- ]
- , [ "patch"
- , { "type": "if"
- , "cond": {"type": "var", "name": "patch-part"}
- , "then":
- { "type": "ACTION"
- , "inputs":
- { "type": "map_union"
- , "$1":
- [ { "type": "to_subdir"
- , "subdir": "in"
- , "$1": {"type": "var", "name": "patch"}
- }
- , { "type": "singleton_map"
- , "key": "splitpatch"
- , "value": {"type": "var", "name": "splitpatch"}
- }
- ]
- }
- , "outs": ["patch"]
- , "cmd": ["sh", "./splitpatch", "in/patch"]
- , "env":
- {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
- }
- , "else": {"type": "var", "name": "patch"}
- }
- ]
, [ "inputs"
, { "type": "map_union"
, "$1":