input command with timeout parameter

Bug #152952 reported by Andrea Gasparini
4
Affects Status Importance Assigned to Milestone
usplash (Ubuntu)
Fix Released
Undecided
Andrea Gasparini

Bug Description

Binary package hint: usplash

usplash could take a new command INPUTTIMEOUT, with this syntax:
# usplash_write "INPUTTIMEOUT <seconds> message"

that behave like INPUT, but goes on with no effects if no input where supplied within <seconds> seconds...

a patch is already available in:
http://codebrowse.launchpad.net/~gaspa/usplash/usplash-addson/revision/170

Revision history for this message
Martin Pitt (pitti) wrote :

This does not quite seem to work at all for me:

(sudo usplash -c -x 800 -y 600 -v &); sleep 1; sudo usplash_write "INPUTTIMEOUT 3 hello"; sudo usplash_write "TEXT-URGENT timeout"; sleep 1; sudo usplash_write QUIT

I did start usplash in verbose mode already. I do not see 'hello' and it does not wait 3 seconds for me either.

Also, the patch needs some documentation. Can you please add the new command to README and the usplash_timeout(8) manpage? Thank you!

Changed in usplash:
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

BTW, while my attempt to merge this I cleaned up the changelog a bit. Please do not use a new Debian revision for every change, only bump the version number if it actually gets uploaded. It should look like

usplash (0.5.8) UNRELEASED; urgency=low

  [ Andrea Gasparini ]
  * usplash.c: Fix zero timeout (it should wait forever instead of not at
    all). (LP: #152933)
  * Changed build-dependency of libgd-dev to libgd2-xpm-dev. (LP: #154234)
  * usplash.c,libusplash.c,libusplash.h: added command INPUTTIMEOUT.
    Syntax: usplash_write "INPUTTIMEOUT <seconds> message". (LP: #152952)

 -- Martin Pitt <email address hidden> Mon, 19 Nov 2007 14:36:37 +0100

Revision history for this message
Andrea Gasparini (gaspa) wrote :

The changelog was because PPA doen't accept two package with the same version...
You could drop all of changelog entries... :)

For the rest, i'll take a look ASAP.

Bye

Revision history for this message
Andrea Gasparini (gaspa) wrote :

Ok, it should works, now...

I corrected also the changelog file ( bumped to 0.5.9 )

Andrea Gasparini (gaspa)
Changed in usplash:
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

It still does not work correctly for me. I do see 'hello' now and I can type something. But the command in comment 1 now waits forever instead of timing out.

How did you test this? Can you please give me your command?

Also, please document this change (README/usplash_timeout(8) manpage). Thank you!

Changed in usplash:
status: Confirmed → Incomplete
Revision history for this message
Andrea Gasparini (gaspa) wrote :

I tested it in two root shell, giving in the first:
export LD_LIBRARY_PATH=.
./usplash -c -x 1024 -y 768 -v

while in the second shell:
usplash_write "TEXT pippo" ; sleep 1; usplash_write "INPUTTIMEOUT 3 hello"; usplash_write "TEXT-URGENT timeout"; cat /dev/.initramfs/usplash_outfifo

In fact, with your command it (doesn't) work as you said, but only if you type something, is it right?

I assumed that if someone issues a INPUTTIMEOUT command, also wants to read it in some way.

( sorry for the readme/manpage, i forgot it ) :(

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 152952] Re: input command with timeout parameter

Hi,

Andrea Gasparini [2007-12-07 14:25 -0000]:
> In fact, with your command it (doesn't) work as you said, but only if
> you type something, is it right?

No, it doesn't time out either if I don't type anything at all.

Revision history for this message
Martin Pitt (pitti) wrote :

Andrea,

I merged your other two bug fixes in that branch to trunk and uploaded. Please re-merge your's. Thank you!

Revision history for this message
Andrea Gasparini (gaspa) wrote :

Thanks, martin.
I merged, I'll try to fix it definitively when i'll have a minute..

Changed in usplash:
assignee: nobody → gaspa
status: Incomplete → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usplash - 0.5.10

---------------
usplash (0.5.10) hardy; urgency=low

  * usplash.c,libusplash.c,libusplash.h: added command INPUTTIMEOUT.
    LP: #152952

 -- Andrea Gasparini <email address hidden> Thu, 18 Oct 2007 17:12:39 +0200

Changed in usplash:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Just for the record, there were several bugs in this implementation which I fixed in bzr head now. Will upload soon.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.