Monday, September 28, 2009

My Kingdom for a Patch?

This blog post is brought to us by the letter P and the number 6, and today's topic is “patching". “Patching". (Alas the written word doesn't do justice to the beginning of each Possum Lodge Word Game.)
Patches are funny “little" files that contain the list of changes or differences between two snapshots of a code base. This is good for keeping track of changes to the code, facilitating reversions, and making it easier to spread the joy of testing and breaking systems to self-appointed guinea pigs.

For this DPS909 lab, the first thing to do was hunt for a patch for my Minefield build. I headed over to the Firefox Builds forum at mozillaZine. From Peter(6)'s seemingly endless series on the rise and fall of the nightly trunk builds, I picked out recently resolved bug 424517.

The gist of 424517 was the “use small icons" option was affecting the additional icons added to the Bookmarks Toolbar, when such icons should be start small and remain small no matter what.
I verified that my Minefield and Iceweasel (just because I could) were exhibiting the unfortunate symptoms of the issue. The “refresh" icon in the Bookmarks Toolbar did indeed resize as the “use small icons" option was toggled back and forth.

The patch added a mere two lines, but the important thing was the results could be easily verified. So I applied it:

mlam@mlamprimary:~/src/mozilla-central$ patch -p1 < lockiconsize.diff
patching file browser/base/content/browser.xul


After some rebuilding I prodded open my improved version of Minefield and, lo and behold, it was cured! The “use small icons" had no effect on the Bookmarks Toolbar, just as the Givers Of Data deemed it should be (and there was much rejoicing.) But just to be perverse:

mlam@mlamprimary:~/src/mozilla-central$ patch -R -p1 < lockiconsize.diff
patching file browser/base/content/browser.xul


And after another bit of rebuilding the issue returned as mysteriously as it had vanished. Very sad.

No comments:

Post a Comment