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

interactiveness in methods



Hello? Is this list dead? :-)

Here's the deal. I sat down today to try my hand at a
"mountable" method for apt (a better sollution than "cdrom"
IMHO) and I noticed it wouldn't be possible - at least, not the
way I conceived it, unless it was implemented internally.

Reason: the advantage of having such a method would be the
possibility of using multiple removeable media - a set of
CDROMs, for example. The method would want to confirm that the
correct CD is in the drive, before mounting it. For that, there
would have to be a way of getting user feedback. As the
documentation says that stdin will be invalid, something must be
done.

The protocol I propose fits nicely in the current paradigm - I
think. The method requests user confirmation via stdout, and apt
answers using signals, as in:

(the method outputs this to stdout)
W Please insert the media labeled "Official binary-i386 CD"

(apt-get would output this:)
Please insert the media labeled "Official binary-i386 CD"
Press ENTER when done, or "s" to skip

(the future apt GUI would likely display a dialog with the
prompt string and two buttons, "Ok" and "Skip")

If the user confirms (ENTER), the UI sends a SIGUSR1 to the
method; if the user skips, the UI sends a SIGABRT (I think this
is the best one, someone correct me if it isn't).

Opinions?



-----
BTW... this is the URI I'm imagining for mountable:

mountable:label@mountpoint:path

as in

mountable:Official binary-i386 CD@/cdrom:debian
mountable:local extras CD@/cdrom:debian/packages



Lalo - sigless till I get my conffiles from home


Reply to: