Old
|
Size: 3719
Comment: Added instructions to patch the source if debian/patches exists.
|
Size: 3060
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 15: | Line 15: |
| Once you know you can replicate the bug, assign yourself the bug in Malone, and set the status to "In Progress". Then, collect the source. For example: | Once you know you can replicate the bug, assign yourself the bug in Malone, and set the status to "In Progress". Then, collect the source and make a backup directory. For example: |
| Line 19: | Line 19: |
| sudo apt-get install build-dep hello }}} Some packages use a patching system to patch the source before building. To see if there are any patches to be applied, check the debian/patches directory. If the files in that directory end in .dpatch, use the following command to patch the source: {{{ debian/rules patch }}} If the files in that directory end in .patch, use the following command to patch the source: {{{ debian/rules apply-patches }}} If there were no files in debian/patches, or the directory did not exist, there is usually no need to patch the source. Once the source is patched, make a backup copy of the source directory before making any changes, with a commend like the following: {{{ cp -a . ../hello-2.2.dist |
cp -a hello-2.2 hello-2.2.dist |
| Line 52: | Line 34: |
| sudo apt-get install build-dep hello |
WARNING THIS PAGE IS A WORK IN PROGRESS, INITIAL REVISION
Each package you install in Ubuntu gets built from a SourcePackage. Each SourcePackage has a page devoted to its bugs.
For instance, the bug page for the hello package is at: [https://launchpad.net/ubuntu/+source/hello/+bugs].
You don't have to know how to program to fix bugs, but it certainly helps! There are some simple things that anyone can do. For starters, many bugs involve typos or documentation problems, which anyone can fix. If you can write in another language, there are plenty of translation errors you can solve. For functionality problems, you can try to track down a fix by the upstream authors of a package. Or find a fix that was included in another distribution.
Replicating bugs
Before trying to fix a bug, please be sure that you can replicate the bug on your local system. If you cannot demonstrate the bug, it is not a good candidate for a fix. If you need more information to replicate the bug, request the information from the submitter in a bug comment.
Generating a patch
Once you know you can replicate the bug, assign yourself the bug in Malone, and set the status to "In Progress". Then, collect the source and make a backup directory. For example:
apt-get source hello cp -a hello-2.2 hello-2.2.dist
Enter the source directory and make the necessary changes to fix the bug. When they are completed, return to the original directory, and make a patch, with a command like the following:
diff -Nur hello-2.2.dist hello-2.2 > hello.patch
Testing the fixes
Once you have a patch, reenter the source directory, and build the package.
cd hello-2.2 sudo apt-get install build-dep hello debuild -us -uc
If the build fails, please review your changes to verify that they are not the cause of the failure. You can regenerate your patched version of the source with the following commands:
rm -rf hello-2.2 dpkg-source -x hello_2.2-1.dsc
If the build succeeds, install the package and make sure you can no longer replicate the bug. The local package can be installed with the following command:
sudo dpkg -i hello_2.2-1_*.deb
If your fix doesn't work, or you cannot fix the bug, remember to update the bug, assigning "Nobody", and changing the status to "Confirmed". You may wish to add a comment describing your experience to assist others trying to fix the bug.
Uploading the patch
If your patch fixes the bug, please add a comment to the bug, and attach your patch. Be sure to check the patch checkbox when uploading your patch. Assign the bug to "Nobody", and the status to "Confirmed". At this point, see out a developer to review your patch for inclusion in the next upload of the package.
N.B. If you are familiar with debian packaging, and would be willing to prepare a new revision candidate including the patches to fix the bug, please review ["MOTU/Hopeful/Tips"], ["MOTU/Bugs"], and ["MOTU/HowToPatch"].
Bugs/HowToFix/Old (last edited 2011-01-14 16:24:48 by 63)