Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 vgaeteradocs: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:
 </code> </code>
  
-Create a new, empty patch file with the //quilt new// command:+At this point, we can either import an upstream patch or we can create a new patch by hand.  The advantage of importing an upstream patch is that the data associated with it is maintained in the project (upstream's git header, author of the patch, why it is necessary, and if it was upstreamed etc). 
 +As an aside, both github and gitlab offer the ability to easily create a patch from a given commit in their respective web interfaces.  To do so simply browse to a commit and edit the URL appending a literal ".patch" to it.
  
-<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 +
-</code>+
  
   * 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 /path/to/010-main_code_fix.patch
 +</code>
 +
 +To simply create a new, empty patch file without importing an existing one:
 +
 +<code bash>
 +quilt new 010-main_code_fix.patch
 +</code>
  
 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 ''quilt refresh'', you can go back to top level directory+After you made your changes and saved your patch with ''quilt refresh'', you can go back to top level directory:
  
 <code bash> <code bash>
-cd ../../../../+cd ../../../..
 </code> </code>
  
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
  • Last modified: 2021/10/15 12:59
  • by vgaetera