Bug#422085: bugscripts are executed, but content not put in email

2008-07-21 Thread Sune Vuorela
reopen 422085
thanks

Hi!

I just tried using reportbug-ng to report bugs against packages like texlive-
doc-base, xserver-xorg and mdadm. (what's common for these 3 packages is that 
thay have bug scripts)

And the result is:
I see a terminal pop up briefly with a lot of text scrolling over and a line 
added to the email with the following:

--- Output from package bug script ---

but no actual output from bug script.

I use kmail as the email client - and running reportbug-ng with -l info  
doesn't reveal any info about why it isn't adding the bug script output.

/Sune
-- 
How may I explore the directory?

You should never close a icon for doubleclicking on the button.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Julien Cristau
On Mon, Jul 21, 2008 at 09:00:04 +, Debian Bug Tracking System wrote:

 This is not a bug of rng and not related to 422085:

err. yes it is.

 * calling /usr/share/bug/texlive-doc-base 31 aborts with an error  
 (getkey: command not found) when called in the console.

That's one of the documented functions such a script can rely on.

 If you feel this is a bug of rng, please open a new report specific to  
 this problem and not to rng not using the scripts at all.

 * xserver-xorg: the output of the script is too long to handle so rng  
 added the following text to the mail (you should have seen that, Sune):

 -8---8---8---8---8---8---8---8---8--
 Please attach the file:
   /tmp/reportbug-ng-xserver-xorg-oob9Xu.txt
 to the mail. I'd do it myself if the output wasn't too long to handle.

   Thank you!
 -8---8---8---8---8---8---8---8---8--

 as you can see rng already gathered the info and even put in in a file,  
 all the user has to do is to attach this file to the mail.

That doesn't make any sense.  If you gather the info, then surely
putting it in the mail is not much more work.  I'm pretty sure you can
attach files to a mail, if nothing else.

 * mdadm: not tested, since not installed, but I assume its one of the  
 above problems.

 Try udev, it also comes with a script whose output isn't  80kb big and  
 it works fine, rng attaches the output automatically and the user has  
 nothing to do.

 The file too long problem isn't rng's fault but a limitation of the  
 shell which can't execute commands of unlimited length. Rng detects such  
 cases where calling the MUA failed and puts the output in a file and  
 asks the user kindly to attach it.

Yes, it's rng's fault.  I'm not sure why you say the shell has anything
to do with this.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur
Julien Cristau wrote:
 On Mon, Jul 21, 2008 at 09:00:04 +, Debian Bug Tracking System wrote:
 * calling /usr/share/bug/texlive-doc-base 31 aborts with an error  
 (getkey: command not found) when called in the console.

 That's one of the documented functions such a script can rely on.

Where is that documented? And where does getkey come from? Haven't found
a package providing this command.

 as you can see rng already gathered the info and even put in in a file,  
 all the user has to do is to attach this file to the mail.

 That doesn't make any sense.  If you gather the info, then surely
 putting it in the mail is not much more work.  I'm pretty sure you can
 attach files to a mail, if nothing else.

Not every MUA supports an attach file option. It's not that I haven't
already tried it (#491499). So since attaching the file automatically is
not possible right now, asking the user kindly to attach the file is the
second best rng can do. And please keep in mind that this only happens
when the output of a script is *very* large -- to large for the shell to
handle -- like the one from xserver-xorg, for the most other packages,
everything should work fine automatically and attaching a file is not
needed.

 The file too long problem isn't rng's fault but a limitation of the  
 shell which can't execute commands of unlimited length. Rng detects such  
 cases where calling the MUA failed and puts the output in a file and  
 asks the user kindly to attach it.

 Yes, it's rng's fault.  I'm not sure why you say the shell has anything
 to do with this.

How do you think rng invokes the different MUAs? If you have a better
solution which supports calling MUAs with bodies of arbitrary
textlengths, then please send me a patch. I'd love to have this included
rather to rely on the user to attach a file.

-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Julien Cristau
On Mon, Jul 21, 2008 at 17:15:10 +0200, Bastian Venthur wrote:

 Julien Cristau wrote:
  On Mon, Jul 21, 2008 at 09:00:04 +, Debian Bug Tracking System wrote:
  * calling /usr/share/bug/texlive-doc-base 31 aborts with an error  
  (getkey: command not found) when called in the console.
 
  That's one of the documented functions such a script can rely on.
 
 Where is that documented? And where does getkey come from? Haven't found
 a package providing this command.

/usr/share/doc/reportbug/README.developers.gz

The function is in /usr/share/reportbug/handle_bugscript which looks
like it could be used pretty much as-is in rng.

  as you can see rng already gathered the info and even put in in a file,  
  all the user has to do is to attach this file to the mail.
 
  That doesn't make any sense.  If you gather the info, then surely
  putting it in the mail is not much more work.  I'm pretty sure you can
  attach files to a mail, if nothing else.
 
 Not every MUA supports an attach file option.

Then they're broken.

 It's not that I haven't
 already tried it (#491499). So since attaching the file automatically is
 not possible right now, asking the user kindly to attach the file is the
 second best rng can do. And please keep in mind that this only happens
 when the output of a script is *very* large -- to large for the shell to
 handle -- like the one from xserver-xorg, for the most other packages,
 everything should work fine automatically and attaching a file is not
 needed.
 
  The file too long problem isn't rng's fault but a limitation of the  
  shell which can't execute commands of unlimited length. Rng detects such  
  cases where calling the MUA failed and puts the output in a file and  
  asks the user kindly to attach it.
 
  Yes, it's rng's fault.  I'm not sure why you say the shell has anything
  to do with this.
 
 How do you think rng invokes the different MUAs? If you have a better
 solution which supports calling MUAs with bodies of arbitrary
 textlengths, then please send me a patch. I'd love to have this included
 rather to rely on the user to attach a file.

There are lots of ways to invoke a program and give it some data that
don't involve giving that data to the shell.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur
Julien Cristau wrote:
 On Mon, Jul 21, 2008 at 17:15:10 +0200, Bastian Venthur wrote:
 Julien Cristau wrote:

 That's one of the documented functions such a script can rely on.
 Where is that documented? And where does getkey come from? Haven't found
 a package providing this command.
 
 /usr/share/doc/reportbug/README.developers.gz
 
 The function is in /usr/share/reportbug/handle_bugscript which looks
 like it could be used pretty much as-is in rng.

Probably, I'll see what I can do.

 as you can see rng already gathered the info and even put in in a file,  
 all the user has to do is to attach this file to the mail.

 That doesn't make any sense.  If you gather the info, then surely
 putting it in the mail is not much more work.  I'm pretty sure you can
 attach files to a mail, if nothing else.
 Not every MUA supports an attach file option.
 
 Then they're broken.

Ok, but that doesn't help very much, right?

 The file too long problem isn't rng's fault but a limitation of the  
 shell which can't execute commands of unlimited length. Rng detects such  
 cases where calling the MUA failed and puts the output in a file and  
 asks the user kindly to attach it.

 Yes, it's rng's fault.  I'm not sure why you say the shell has anything
 to do with this.
 How do you think rng invokes the different MUAs? If you have a better
 solution which supports calling MUAs with bodies of arbitrary
 textlengths, then please send me a patch. I'd love to have this included
 rather to rely on the user to attach a file.
 
 There are lots of ways to invoke a program and give it some data that
 don't involve giving that data to the shell.

I'm still waiting for for a solution which works for python. Currently I
use the command module of python which in turn calls os.popen. The limit
of the command length seems to be somewhere between 1 and 2
characters (or maybe some completely different number) -- if you have a
way to call a program with arbitrary command length, please tell me how
-- I'll just apply the patch and we can forget about this whole please
attach the file yourself thing.


-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Stephen Gran
This one time, at band camp, Bastian Venthur said:
 And please keep in mind that this only happens when the output of a
 script is *very* large -- to large for the shell to handle -- like the
 one from xserver-xorg, for the most other packages, everything should
 work fine automatically and attaching a file is not needed.

What does 'too large for the shell to handle' mean?  Believe me, I've
worked with the shell for quite a while now, and I have never seen a
'file too large' type error message since the bad old days when some
filesystems didn't have LFS support.
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


signature.asc
Description: Digital signature


Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Julien Cristau
On Mon, Jul 21, 2008 at 18:00:12 +0200, Bastian Venthur wrote:

 The output of /usr/share/bug/xserver-xorg/script 31 is ~65K big.
 Calling the mua like: mua --body $OUTPUT ... does not work, at least

Calling the mua like that doesn't make any sense.  Just give it a
filename or something on stdin, don't inject arbitrary data in the
command line.

Puzzled,
Julien



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur
Stephen Gran wrote:
 This one time, at band camp, Bastian Venthur said:
 And please keep in mind that this only happens when the output of a
 script is *very* large -- to large for the shell to handle -- like the
 one from xserver-xorg, for the most other packages, everything should
 work fine automatically and attaching a file is not needed.
 
 What does 'too large for the shell to handle' mean?  Believe me, I've
 worked with the shell for quite a while now, and I have never seen a
 'file too large' type error message since the bad old days when some
 filesystems didn't have LFS support.

The output of /usr/share/bug/xserver-xorg/script 31 is ~65K big.
Calling the mua like: mua --body $OUTPUT ... does not work, at least
not with python's command module. Trying it directly in my shell results
in the output to be truncated at a certain point, so I guess there is a
limit.


-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur
Julien Cristau wrote:
 On Mon, Jul 21, 2008 at 18:00:12 +0200, Bastian Venthur wrote:
 
 The output of /usr/share/bug/xserver-xorg/script 31 is ~65K big.
 Calling the mua like: mua --body $OUTPUT ... does not work, at least
 
 Calling the mua like that doesn't make any sense.  Just give it a
 filename or something on stdin, don't inject arbitrary data in the
 command line.

Please give me a concrete example, so I can implement your idea. Please
test if it works with xdg-email and icedove. It also has to work
combined with python's command.getoutput or at least from within Python.

-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Julien Cristau
On Mon, Jul 21, 2008 at 18:16:39 +0200, Bastian Venthur wrote:

 Please give me a concrete example, so I can implement your idea. Please
 test if it works with xdg-email and icedove. It also has to work
 combined with python's command.getoutput or at least from within Python.
 
*sigh*

command=xdg-email ...

if [ -d /usr/share/bug/$pkg ]; then
script=/usr/share/bug/$pkg/script
else
script=/usr/share/bug/$pkg
fi
if [ -x $script ]; then
foo=$(mktemp)
/usr/share/reportbug/handle_bugscript $script $foo
command=$command --attach $foo
fi
$command

I don't know python, but I'm sure something like that is pretty easy.
And no, I'm not going to test with icedove.

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur


Julien Cristau wrote:
 On Mon, Jul 21, 2008 at 18:16:39 +0200, Bastian Venthur wrote:
 
 Please give me a concrete example, so I can implement your idea. Please
 test if it works with xdg-email and icedove. It also has to work
 combined with python's command.getoutput or at least from within Python.

 *sigh*
 
 command=xdg-email ...
 
 if [ -d /usr/share/bug/$pkg ]; then
 script=/usr/share/bug/$pkg/script
 else
 script=/usr/share/bug/$pkg
 fi
 if [ -x $script ]; then
 foo=$(mktemp)
 /usr/share/reportbug/handle_bugscript $script $foo
 command=$command --attach $foo
 fi
 $command

*sigh*

Hmm ok, now we're starting to repeat ourself:

- A few mails ago, I already explained (and provided a bugnumber), that
  the --attach parameter of xdg-email doesn't work and that not every
  MUA supports attaching a file from the command line.
- You said, then the MUAs are broken.
- I said, that conclusion doesn't help to solve the problem.

The problem remains that I somehow have to get this info into the mail.
  I believe my current approach works good enough, but I'm of course
open to better solutions.


-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Julien Cristau
On Mon, Jul 21, 2008 at 18:46:16 +0200, Bastian Venthur wrote:

 - A few mails ago, I already explained (and provided a bugnumber), that
   the --attach parameter of xdg-email doesn't work and that not every
   MUA supports attaching a file from the command line.
 - You said, then the MUAs are broken.
 - I said, that conclusion doesn't help to solve the problem.
 
I think it does.  rng can choose not to use broken MUAs (which ones are
these, btw?).

Cheers,
Julien



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#422085: closed by Bastian Venthur [EMAIL PROTECTED] (Re: Bug#422085: bugscripts are executed, but content not put in email)

2008-07-21 Thread Bastian Venthur
Julien Cristau wrote:
 On Mon, Jul 21, 2008 at 18:46:16 +0200, Bastian Venthur wrote:
 
 - A few mails ago, I already explained (and provided a bugnumber), that
   the --attach parameter of xdg-email doesn't work and that not every
   MUA supports attaching a file from the command line.
 - You said, then the MUAs are broken.
 - I said, that conclusion doesn't help to solve the problem.

 I think it does.  rng can choose not to use broken MUAs (which ones are
 these, btw?).

That's not an option. I'd rather support more than less MUAs. Every MUA
I'm aware of supports at least the mailto: paramter which is sufficient
for rng's needs. The attachment option is *only* needed when the output
of the script gets too long (so the mailto:-link gets too long, so the
whole command gets too long for the shell) and therefore an attachment
would be more suitable. There is no way I remove support for certain
MUAs just because of this.

The most imporant MUA which doesn't seem to work is xdg-email in
combination with icedove set as default MUA (haven't tested others, but
I suppose there are lots of others).


-- 
Bastian Venthur  http://venthur.de
Debian Developer venthur at debian org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]