Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-developer:toolchain:use-patches-with-buildsystem [2021/10/15 12:59] – [Adding a new patch] formatting vgaetera | docs:guide-developer:toolchain:use-patches-with-buildsystem [2022/07/24 19:31] (current) – [Adding a new patch] mention importing an upstream patch darksky2 | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| </ | </ | ||
| - | Create | + | At this point, we can either import an upstream patch or we can create |
| + | As an aside, both github and gitlab offer the ability to easily create a patch from a given commit in their respective web interfaces. | ||
| - | <code bash> | + | To import a patch, download it to a temp directory, and give it a name according to these guidelines: |
| - | quilt new 010-main_code_fix.patch | + | |
| - | </ | + | |
| * The name should start with a number, followed by a hyphen and a very short description of what is changed | * The name should start with a number, followed by a hyphen and a very short description of what is changed | ||
| * The chosen number should be higher than any existing patch - use //quilt series// to see the list of patches | * The chosen number should be higher than any existing patch - use //quilt series// to see the list of patches | ||
| * The patch file name should be short but descriptive | * The patch file name should be short but descriptive | ||
| + | |||
| + | <code bash> | ||
| + | quilt import / | ||
| + | </ | ||
| + | |||
| + | To simply create a new, empty patch file without importing an existing one: | ||
| + | |||
| + | <code bash> | ||
| + | quilt new 010-main_code_fix.patch | ||
| + | </ | ||
| After creating the empty patch, files to edit must be associated with it. | After creating the empty patch, files to edit must be associated with it. | ||
| Line 214: | Line 223: | ||
| And in case you are editing files, it works like for packages but as you saw with the command to make the new patch you need to add the folder name before the name of the patch you are working on. | And in case you are editing files, it works like for packages but as you saw with the command to make the new patch you need to add the folder name before the name of the patch you are working on. | ||
| - | After you made your changes and saved your patch with '' | + | After you made your changes and saved your patch with '' |
| <code bash> | <code bash> | ||
| - | cd ../../../../ | + | cd ../../../.. |
| </ | </ | ||
| Line 322: | Line 331: | ||
| ===== Iteratively modify patches without cleaning the source tree ===== | ===== Iteratively modify patches without cleaning the source tree ===== | ||
| When implementing new changes, it is often required to edit patches multiple times. | When implementing new changes, it is often required to edit patches multiple times. | ||
| - | To speed up the process, it is possible to retain the prepared source tree between | + | To speed up the process, it is possible to retain the prepared source tree between edit operations. |
| - | edit operations. | + | |
| - Initially prepare the source tree as documented above | - Initially prepare the source tree as documented above | ||