matthew@seymour:~$ apt-cache showsrc tomboy | grep ^Package:
Package: tomboy
matthew@seymour:~$ apt-cache showsrc python-vigra | grep ^Package:
Package: libvigraimpex
In the first example, the binary tomboy is in the tomboy package. In the
second example, the binary python-vigra is in the librigraimpex
package. When you know the package that contains the source code you need,
get a copy of the source code itself. You do this in Ubuntu by branching the
source package. Launchpad manages all the code for source packages and is
the place from which you will download and create a local branch. You fix
bugs in the local branch and test them on your machine and then submit a
merge proposal so that code from your branch can be examined and merged
back into the main branch of the code to then be used to build a new package
of the code.
Create a local repository on your machine for the code, again replacing
matthewsapp with the name of the source package you need:
Click here to view code image
matthew@seymour:~$ bzr init-repo matthewsapp
Change to the newly created directory:
Click here to view code image
matthew@seymour:~$ cd matthewsapp
Create a new local branch And name it something obvious. Many Ubuntu
developers name the new target directory the same as the original, with .dev
added at the end, like this:
Click here to view code image
matthew@seymour:~$ bzr branch ubuntu:matthewsapp matthewsapp.dev
After you have done this a few times with packages already in the Ubuntu
repositories, you can read the official Ubuntu Packaging Guide to find out
how to perform similar tasks with code from other Ubuntu releases, from
Debian, or from an upstream .tar file. This section concentrates on doing
this the easy way to help you get started.
Create a patch that will include the fix for the bug:
Click here to view code image
matthew@seymour:~$ edit-patch 99-new-patch
This copies the packaging of the file to a new temporary directory. Edit the
files with a text editor or use a patch to do so in a temporary shell, like this: