[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

forward-bug.pl (was: Wheezy!)



On Mon, 07 Mar 2011 16:47:37 +0000, Alessandro Ghedini wrote:

> > Forward-bug/forward-patch
> > -------------------------
> >
> > I still think that a tool for easily forwarding bug reports and
> > patches to the CPAN RT would be helpful; in svn/scripts there's
> > forward-patch -- but it only contains POD that outlays my ideas at
> > that time.
> >
> > In the meantime Tim has detected RT::Client::REST, David was in
> > contact with the upstream author of App::rtpaste, and Maximilian also
> > has expressed interest in such a tool. -- Maybe someone can invest a
> > rainy afternoon into such a tool?
> 
> I've just spent about 15 minutes trying to create a simple "proof-of-concept"
> bug forwarding script.

Wow, very nice! Thanks.
 
> It's nothing more than a hack: it takes the Debian bug number and the name
> of the CPAN distribution (this probably can be replaced by reading the value
> of "Upstream-Name" in d/copyright), 

Yup, or from d/watch or d/control or anything that looks like a CPAN
URL :)

> fetch information (e.g. "subject", ...)
> about the bug using the Debbug SOAP interface, creates a new ticket on RT
> (the body of the message has to be written by the user, since due to a bug
> in either the Debbug SOAP interface, SOAP::Lite or my understanding of the
> functioning of the two, I was not able to use the 'get_bug_log' method of the
> SOAP API properly) 

I just tried to use get_bug_log but I also had no success; cc'ing Don
in the hope that he can shed some light on this question.

> To create the bug on CPAN's RT it is obviously needed a valid BitCard or PAUSE
> account.

Having this in a file (like rtpaste does) might be nice.
 
> Since I didn't test it ('m too scared of doing a disaster) I'm not
> sure if it is usable, but it may serves as a starting point/example
> for another try in the future (I can of course improve it, if it
> proves useful for someone). 

I guess I should really try it :)
And I'm sure it's useful!

Ok, here we go:
Let's find a friendly upstream: done.
Edit script (login, pass, 'https' for the RT URL): done.
Install dependencies: done.

Run it: ./forward-bug.pl 616566 Config-Model-Itself

$EDITOR appears. Edit. Close $EDITOR:

The script exits with status 255 and
"odd number of arguments passed"

Playing around.

Oops, if I exit $EDITOR without saving the ticket gets created:
https://rt.cpan.org/Public/Bug/Display.html?id=66455

A trivial example with Proc::InvokeEditor works, no idea why it
doesn't in this context. Maybe it's safer to put it outside the
ticket creation?

Oh, the following behaves differently:

    my $string = "foo";
    print Proc::InvokeEditor -> edit($string);

and

    my $string = "foo";
    my $result = Proc::InvokeEditor -> edit($string);
    print $result;


And the bug is marked as forwarded:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616566

Although the forwarded address doesn't look so good:
http://rt.cpan.org/Public/Bug/Display.html?id=RT::Client::REST::Ticket=HASH(0x9379030)
:)
Should probably be $ticket->id or something like that in the $url
line.

(I leave the RT bug and the 'forwarded' value of the Debian bugs as
they are for now.)

> P.S. I can also try to do something similar for the forward-patch
> thing (and then merge both the scripts in one) but I don't feel
> like doing it right now.

No hurry but I hope that at some point you feel like looking into it
:)
 
> [0] https://gist.github.com/858661


Cheers,
gregor

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Ludwig Hirsch: Winterschlaf

Attachment: signature.asc
Description: Digital signature


Reply to: