69
69
To add a new patch you need to tell Quilt to create a new patch, tell it which
70
70
files that patch should change, edit the files then refresh the patch::
72
$ quilt new kubuntu_02_programme_description.diff
73
Patch kubuntu_02_programme_description.diff is now on top
72
$ quilt new kubuntu_02_program_description.diff
73
Patch kubuntu_02_program_description.diff is now on top
74
74
$ quilt add src/main.cpp
75
File src/main.cpp added to patch kubuntu_02_programme_description.diff
76
$ sed -i "s,Webcam picture retriever,Webcam snapshot programme,"
75
File src/main.cpp added to patch kubuntu_02_program_description.diff
76
$ sed -i "s,Webcam picture retriever,Webcam snapshot program,"
79
Refreshed patch kubuntu_02_programme_description.diff
79
Refreshed patch kubuntu_02_program_description.diff
81
81
The ``quilt add`` step is important, if you forget it the files will not end up
84
84
The change will now be in
85
``debian/patches/kubuntu_02_programme_description.diff`` and the ``series``
85
``debian/patches/kubuntu_02_program_description.diff`` and the ``series``
86
86
file will have had the new patch added to it. You should add the new file to
89
$ bzr add debian/patches/kubuntu_02_programme_description.diff
89
$ bzr add debian/patches/kubuntu_02_program_description.diff
91
$ dch -i "Add patch kubuntu_02_programme_description.diff to improve the programme description"
91
$ dch -i "Add patch kubuntu_02_program_description.diff to improve the program description"
94
94
Quilt keeps its metadata in the ``.pc/`` directory, so currently you need to
95
95
add that to the packaging too. This should be improved in future.
97
As a general rule you should be careful adding patches to programmes unless
97
As a general rule you should be careful adding patches to programs unless
98
98
they come from upstream, there is often a good reason why that change has not
99
99
already been made. The above example changes a user interface string for
100
100
example, so it would break all translations. If in doubt, do ask the upstream
138
Applied kubuntu_02_programme_description.diff
138
Applied kubuntu_02_program_description.diff
140
140
It is a good idea to run refresh, this will update the patch relative to the
141
141
changed upstream source::
144
Refreshed patch kubuntu_02_programme_description.diff
144
Refreshed patch kubuntu_02_program_description.diff
146
146
Then commit as usual::
165
165
Other patch systems used by packages include ``dpatch`` and ``cdbs
166
166
simple-patchsys``, these work similarly to Quilt by keeping patches in
167
debian/patches but have different commands to apply, unapply or create patches.
167
debian/patches but have different commands to apply, un-apply or create patches.
168
168
You can use ``edit-patch``, shown in previous chapters, as a reliable way to
169
169
work with all systems.