Age | Commit message (Collapse) | Author |
|
Add the ability to exclude sections of the common code. The primary use
case is if the common code is executinga function that causes undesired
side effects for the customization.
Here is example code in "bin/acme/patcher/inplace/bin/srt.patch":
### ACME_EXTENSION_EXCLUDE_BEGIN ###
#echo "The system will $CMD."
#
### ACME_EXTENSION_EXCLUDE_END ###
### ACME_EXTENSION_BEGIN ###
#
# NOTE: Exclusions should be used only when necessary
# NOTE: The excluded lines are commented so that they are inactive
# but restorable
#
echo "The ACME SRTool system will now $CMD!"
### ACME_EXTENSION_END ###
The content in the excluded section are commented, so that when it is cleaned
those lines can be restored to the original.
Signed-off-by: David Reyna <David.Reyna@windriver.com>
|
|
Add 'in-place' patch support for customizing organization patches on top
of regular upstream SRTool files.
An example is provided in "bin/acme/patcher/inplace/bin/srt", which adds
a custom hello message.
* To assert (merge) the custom version for runtime, run:
$ ./bin/common/srtool_patcher.py -J bin/acme/patcher.json -I
* To stash the customized version and replace with clean version (but keep
any changes in the public sections for pushing upstream), run:
$ ./bin/common/srtool_patcher.py -J bin/acme/patcher.json -i
Signed-off-by: David Reyna <David.Reyna@windriver.com>
|
|
Add formal support for extending and customizing shared template code files.
* The initial use case is a shared Jira integration file that partners can
extend to their particular installation. A working example is provided in
the ACME directory:
upstream: "bin/common/srtool_jira_template.py"
custom : "bin/acme/srtool_jira_acme.py"
* The custom sections are blocked off with comment tags (e.g. ACME)
### ACME_EXTENSION_BEGIN ###
...
### ACME_EXTENSION_END ###
* The './bin/common/srtool_patcher.py' tool provides the support, for example:
To merge shared upstream code into the custom Jira script, run:
$ ./bin/common/srtool_patcher.py -j bin/acme/patcher.json --merge-original
To merge edits in script's common areas back to upstream, run:
$ ./bin/common/srtool_patcher.py -j bin/acme/patcher.json --merge-custom
Signed-off-by: David Reyna <David.Reyna@windriver.com>
|