~andrewsomething/ubuntu-packaging-guide/version-number-in-footer

« back to all changes in this revision

Viewing changes to patches-to-packages.rst

  • Committer: Andrew Starr-Bochicchio
  • Date: 2012-03-05 01:12:45 UTC
  • mfrom: (78.1.2 program-spelling)
  • Revision ID: a.starr.b@gmail.com-20120305011245-7g9imk5zvpuhnpwx
Merge spelling fixes from Stefano Rivera:

lp:~stefanor/ubuntu-packaging-guide/program-spelling 

Show diffs side-by-side

added added

removed removed

Lines of Context:
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::
71
71
 
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,"
77
77
    src/main.cpp
78
78
    $ quilt refresh
79
 
    Refreshed patch kubuntu_02_programme_description.diff
 
79
    Refreshed patch kubuntu_02_program_description.diff
80
80
 
81
81
The ``quilt add`` step is important, if you forget it the files will not end up
82
82
in the patch.
83
83
 
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
87
87
the packaging::
88
88
 
89
 
    $ bzr add debian/patches/kubuntu_02_programme_description.diff
 
89
    $ bzr add debian/patches/kubuntu_02_program_description.diff
90
90
    $ bzr add .pc/*
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"
92
92
    $ bzr commit
93
93
 
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.
96
96
 
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
135
135
Then carry on::
136
136
 
137
137
    $ quilt push
138
 
    Applied kubuntu_02_programme_description.diff
 
138
    Applied kubuntu_02_program_description.diff
139
139
 
140
140
It is a good idea to run refresh, this will update the patch relative to the
141
141
changed upstream source::
142
142
 
143
143
    $ quilt refresh
144
 
    Refreshed patch kubuntu_02_programme_description.diff
 
144
    Refreshed patch kubuntu_02_program_description.diff
145
145
 
146
146
Then commit as usual::
147
147
 
164
164
 
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.
170
170