1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
Editing and creating patches
============================
To start, you should be in the source package directory (this is the
directory that contains the debian/ directory) and run:
debian/rules untar
Editing an existing patch
-------------------------
Run:
quilt push yourpatchname.diff
Make your edits now, directly in the source tree. If you're editing a file
that wasn't previously included in the patch, you must let quilt know you're
doing it by using:
quilt add filename
or
quilt edit filename
If you're not sure if you need this, you can run "quilt files" to see if your
file is already in there, or "quilt patches filename" to see if the current
patch edits the specified file. Once you're done editing, run:
quilt refresh -p1
to update your patch. This will create a unified diff patch with a strip
number of 1. You can then go in to the patches directory and document your
patch by adding a description of it to the top of the patch file. It is very
advisable always to document the changes you have made in the header of the
patch.
Creating a new patch
--------------------
Decide where your patch belongs according to the number series. Once you do
this, run:
quilt push patch-before-yours
where "patch-before-yours" specifies the filename of the patch that will be
the last one applied before your new patch. Then run:
quilt new patchname
using the name of the patch (including the appropriate number). Then, as
described above in the case of editing existing patches, you'll want to be
sure quilt knows which files you are editing. Run:
quilt add filename
Now make your edits to the source files, directly in the source tree. When you
are finished, run:
quilt refresh -p1
Once you're all done with patch creation/editing, run:
debian/rules clean
to get rid of the things that had to be set up.
|