I've recently been trying to push out some stagnating changes to various Open Source projects, and I've come across this same problem on numerous occasions but one has just bitten me enough to write this(although not enough to name and shame just yet).
One of the changes I've been trying to push is broken documentation installs in packages, in an effort to kill all the low hanging fruit and immediately clear a significant (20+%) of all the two or more month old changes that I have sitting about. Boring work, in fact incredibly boring, but necessary for the packages to pass even the most basic QA checks for an install at our sites. Anyhow, along the way this has resulted in some minor changes elsewhere as normally happens when you look at anything... and this is where the problems begin.
Today's trigger is an existing bug report, which includes a version bump for the package in question. Instead of doing the Right Thing ™ and submitting patches, there are 4 independent whole file marginally changed copies attached to the bug and a couple of whole file completely unrelated redundant fixes.
Nobody appears to have the sense to obsolete old versions either, so you are left poking around in every attachment trying to decipher what is happening. Once you've found the closest approximation of the correct fix you decide to test that one out against your patch, so you can submit a change for the version bumped package too. And this is where the value of using a patch becomes apparent, you see between the initial posting of this version bump a number of significant fixes have been applied to the current packages and now you are left with a version bump that is missing fixes that have already had time burnt on them.
Of course, no one in their right mind would trust a BTS patch or file as being correct, especially on submitted by a random untrusted user. However, this is how the little problems sneak in. The maintainer is either left doing a visual diff(in the eyeball sense) against the current tree, or producing their own real diffs against the current tree, just for the initial sanity check. All it does is add extra work for everybody involved, it is the original one-to-many problem as seen through the eyes of a BTS.
I've seen this happen a few times in our BTS, and it has been rightly stomped on by every single person who has glanced at the bug and the perpetrator quickly learns in a baptism of fire.
Unfortunately that route isn't open to me today, it isn't our BTS so the options are a little more limited.
- Resync and create patches the way they should have been done in the first place for all the attachments.
- Resync and post a whole file copy including the fixes that have been done in the tree since the bug was initially supported, and continue the nastiness that has already been started. Then post either a patch with my fixes applied, or yet another whole file copy.
- Push the bug to the back of the pile, and file later once the version bump has been resolved. After all, this isn't a show stopper by any means.
Right now, I know there is only one solution with value to me. The real problem here is that the solution I have to arrive at here means fixes aren't getting pushed back upstream when they should be.
What are the lessons to be learned here? Simply a reminder of the small things, not so much "best practice" as "common sense practice".
- You should only submit patches against current files, never whole files(unless it is a complete rewrite).
- Attachments should always be marked obsolete when updates are posted.
- All decent BTS have options to set dependencies because they are incredibly important to track, just including a vague reference in the text doesn't help. At the same time make sure you are creating an actual dependency, and are not just quoting on a previously filed bug!
- If you don't understand _any_ of the bug management policies ask someone. If you're using our BTS and don't know who to ask drop me a mail, I would rather individually reply to every single person then see yet more misuse.
This rant has been brought to you by no fault of your own ;)