Différences
Ci-dessous, les différences entre deux révisions de la page.
| ubuntudevelopment:patches [Le 21/01/2009, 02:49] – créée 213.95.41.13 | ubuntudevelopment:patches [Le 22/09/2009, 16:49] (Version actuelle) – suppression YoBoY | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | * UbuntuDevelopment/ | ||
| - | Home | ||
| - | |||
| - | |||
| - | Getting Started | ||
| - | Get started here! | ||
| - | |||
| - | |||
| - | Packaging Guide | ||
| - | |||
| - | |||
| - | FAQ | ||
| - | |||
| - | |||
| - | Knowledge Base | ||
| - | |||
| - | |||
| - | Events | ||
| - | |||
| - | Contents | ||
| - | |||
| - | 1. Patches | ||
| - | 1. Attributes | ||
| - | 2. General Tips | ||
| - | 3. Other Resources | ||
| - | |||
| - | Patches | ||
| - | |||
| - | What constitutes a good patch? What kind of attributes do Ubuntu developers follow before they send a patch upstream? This document is an effort to document "best practices" | ||
| - | |||
| - | Attributes | ||
| - | |||
| - | Things to consider with upstreams before sending a patch. | ||
| - | |||
| - | * Willingness to rework/ | ||
| - | * General applicability instead of being distribution specific - Remember that distributions are downstream from most projects, your patch should be generic and not distribution specific. Don't make assumptions about plumbing, if you're unsure, ask someone. | ||
| - | * Correctness - If upstream is going to integrate your patch and maintain that piece of code going forward it should be clean and correct. | ||
| - | * Following code style/ | ||
| - | * Version of your software (trunk vs. what is released) - be clear as to which version of the project the patch applies to. It doesn' | ||
| - | * Speed at which it's provided | ||
| - | * Documentation in the patch - what the patch does, etc. References to bug descriptions/ | ||
| - | o | ||
| - | |||
| - | Please also check out our patch tagging guidelines. It's important to document internally where we got the patch from and why it is important. | ||
| - | * An accompanying unit test - If the upstream project has unit tests, test the patch with that test. | ||
| - | * If patch is invasive/ | ||
| - | * One bug/feature per patch - Most projects prefer this instead of one huge invasive diff. | ||
| - | |||
| - | General Tips | ||
| - | |||
| - | * Know your audience. Everyone has style and pet peeves about how code should be formatted. Realize that they' | ||
| - | * Make it obvious. After you make a patch, actually read the patch. Is it obvious what it's doing? Is something getting included that shouldn' | ||
| - | * Ensure that it applies cleanly. If you've made it against a stable version ensure that it applies cleanly to development versions so that it can be applied quickly and easily. | ||
| - | * Justify it. There is a reason that this patch is important and make sure to convey it. The reason isn't " | ||
| - | * Break it up. Sometimes a fix to a problem contains several smaller fixes to different sub problems. It is much better to break these into smaller bite-size patches. They' | ||
| - | * Be Collaborative. You are asking someone to take time out of their day and look at your work. Sure, they want their software to be better but they don't have to listen to you. Similarly you are contributing to their project so having a positive attitude with working someone helps here. | ||
| - | * Read this list again. Notice that everything on this list is more related to social interactions than code interactions. Open Source software is about people. Don't forget it. | ||
| - | |||
| - | Other Resources | ||
| - | |||
| - | * | ||
| - | |||
| - | Kernel Bug Fixing - a step-by-step guide for fixing a kernel bug with an example. | ||
| - | * | ||
| - | |||
| - | Kernel Patches - Some kernel-specific tips for dealing with patches. | ||
| - | |||
| - | CategoryProcess | ||
| - | CategoryUbuntuDevelopment | ||
