BugLink parsing

Tim Gardner tim.gardner at canonical.com
Fri May 1 16:36:56 UTC 2009

Brad Figg wrote:
> Andy Whitcroft wrote:
>> On Fri, May 01, 2009 at 07:45:17AM -0600, Tim Gardner wrote:
>>> Andy and Brad,
>>> I'm really liking the kernel patches that I've seen lately that have a
>>> BugLink field, and I've been thinking that we should adopt the use of
>>> 'BugLink:' and stop using 'Bug:' in our templates altogether. However, I
>>> need some changes made to scripts/misc/git-ubuntu-log in the various git
>>> repos, so since you're both my resident perl experts, I'd like one of
>>> you to make the following changes:
>>> 1) Add support for parsing the bug number from a BugLink and place it in
>>> the changelog entry in a form that the Launchpad upload bot understands
>>> (i.e., '- LP: #NNNN') such that we can get automatic changelog goodness
>>> in each referenced bug.
>>> 2) Modify all of the commit templates in all of the repos such that
>>> BugLink is preferred. Perhaps even delete the 'Bug:' field from the
>>> template altogether.
>>> I think there are a couple of good reasons for doing this.
>>> 1) I'm a lazy typist. I find it quite convenient to simply click on the
>>> Buglink URL and be presented with the bug page.
>>> 2) The 'Bug:' field implies a certain context, which is useless when
>>> pushing our patches upstream. Rather then having to cleanse patches of
>>> irrelevant information, lets put it in the commit in an interesting and
>>> useful form to begin with. I suspect, given the feedback that Amit has
>>> already received from Andrew Morton, that the 'Bug:' field will not be
>>> well received in general.
>>> 3) Finally, if we start developing for the upstream kernel (as we will
>>> if I get my way), we can take advantage of BugLink goodness
>>> automatically as our upstream patches show up in stable and other
>>> places.
>>> Thoughts?
>> Like the sound of it.  I have seen a number of links to bugzillas and
>> think we should be doing the same.  The fixes are likely simple, will
>> get with brad and figure out who is going to push the buttons.
>> -apw
> I have the changes implemented and some initial testing done.
> I can make it so that:
>   1. If there is a "Bug: #" line and no "BugLink:" line that the LP url
>      is automatically created.

Of what use is this feature? Where is the URL created? In the changelog?
The changelogs don't really need the URL, and IMHO would just be clutter.

We _should_ be able to create a changelog entry from either source
field, e.g., 'Bug:' or 'BugLink:'. Its probably also worthwhile to make
the field detection case independent. Furthermore, if both fields exist,
they had better reference the same bug.

>   2. If there is a "BugLink:" line and no "Bug: #" the "LP: #" is extracted
>      from the URL if it is a "bugs.launchpad.net" url.

Sounds right.

Tim Gardner tim.gardner at canonical.com

More information about the kernel-team mailing list