View unanswered posts View posts from last 24 hours. View previous topic :: View next topic. Drasica Apprentice Joined: 16 Apr Posts: Posted: Wed Mar 02, pm Post subject: How to apply patches? Back to top. Posted: Wed Mar 02, pm Post subject:. The affected version of that package is 1. Next, an arbitrarily named file with suffix. For testing, step into the package's ebuild directory and run the ebuild pcmanfm With the message "User patches applied.
Please see The files Directory for more information. If a package requires many patches, even if they are individually small, it is often best to create a patch tarball to avoid cluttering up the tree too much. It is possible to include a description with a patch. This is often helpful when others come to work with your packages, or, indeed when you come back to take a look at your own package a few months later.
Good things to include in comments are:. To include the description, simply insert it at the top of the patch file. The patch tool will ignore leading text until it finds something that looks like it might be a 'start patching' instruction, so as long as each description line starts with letters rather than numbers, symbols or whitespace there shouldn't be a problem.
Alternatively, prefix each description line with a hash that's , or 'pound' to the USians sign. It's also best to leave a single blank line after the description and before the main patch. It refers to all the metadata that exists in the patch to make it "maintainable".
This may take more effort "up front", but the amount of effort that it saves for everyone else in the future more than makes up for it. This refers to other distributions or upstream maintainers who read the patch, or future Gentoo maintainers. By keeping all patches "clean", people can quickly and easily assess a patch without searching through many other files. Your patch name should be short and to the point.
When doing a file listing e. It should also include the package name and the version it was written against. This way, people searching for patches or who happen to just stumble across the file itself have a clue as to what it's for. Now make the necessary changes to the unpacked source code, one or more files may be changed. Of course, the required changes should probably be known in advance.
When changes are done, have git output the diff, and tee it into the patch file:.
0コメント