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

Re: Change the format of /usr/share/bug/*/script



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 11 Sep 2008 18:03:14 +0100
Neil Williams <codehelp@debian.org> wrote:

>> Making everything have to conform to GUI requirements is also
> non-friendly. reportbug must still be usable over SSH without requiring
> SSH -X. IMHO the GUI requirements should be lower priority than existing
> CLI behaviour.
>

Who said the CLI won't work?
 
> My own scripts don't use cat <<EOF, although the function does use cat
> to pass the file data into reportbug, that is cat "$file" >&3
> 

Oh since you said about /etc/apt/sources.list I thought you were talking about the apt package.

> Why is display() any better? How is reportbug CLI meant to implement
> display() ? The CLI doesn't want to display the file, it wants to read
> it in and put it into the temporary file.
> 

display()
{
	echo $@
}

Using a FIFO this means the script can output messages to the UI. There's not only yesno() but also other information and messages that can be issued by the script. If the problem was only yesno(), I wouldn't have the problem to tricky-hack cat().

> I don't see the problem here, you call the bug script from another shell
> script that you write yourself. Your yesno() function does what is
> needed to ask the user and get the feedback then passes that back to the
> script and reads in the reply from the script. Then your own shell
> script can communicate with whichever GUI code you need - maybe by
> writing out a temporary file that the frontend adds to the displayed
> content.
> 

In fact I've been talking about a FIFO in my previous mails.

> > Reportbug is ok with text and urwid (which also stops curses and
> > switches to text), but the coming GTK+ interface won't support it.
> 
> Then the GTK+ frontend is broken and should be fixed so that it can
> support the existing format of the bug scripts.
> 

Broken? Would you say it's broken because the script is text-only?
Fixing? The mostly sane fix is to embed a VTE.

> I don't see that at all. You simply wrap the existing shell code in your
> own shell wrapper that calls something like zenity or another bespoke
> interface that raises the necessary dialog, get the result and continues
> within shell. Then when the sourced bug script has processed the results
> of the bug script, it simply writes that out to a temporary file - or
> appends it to whatever temporary file is currently in use.
> 

Ah ok so reportbug should (e.g.) have multiple handling scripts for the different UIs, and not relying to the UI layer but to a yet another script for dialogs. That's a good solution.

- -- 
http://syx.googlecode.com - Smalltalk YX
http://lethalman.blogspot.com - Thoughts about computer technologies
http://www.ammazzatecitutti.org - Ammazzateci tutti
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkjJW8oACgkQw9Qj+8Kak3ElkQCfbBbjSnU+gkSvst2TeMyt+Fem
cykAnjSwAbqujOAWi/08TOb2umr91DNa
=TJQr
-----END PGP SIGNATURE-----

Reply to: