On Thu, 15 Mar 2012 11:40:49 -0600 Bob Proulx wrote: > Francesco Poli wrote: [...] > > The most general issue is that apt-listbugs needs to perform the > > following steps (when run in "apt" mode): > > > > * first it reads some input through its STDIN, through a pipe > > > > * when this input ends (EOF), apt-listbugs needs to be able to become > > interactive and ask questions to the user, and get answers from STDIN, > > and possibly also run a web browser (that could be a textual browser, > > depending on the user preferences) and let the user interact with the > > browser > > Being a long time Unix programmer the above two contraints appear to > me to be opposing contraints that are not possible to accomplish in a > portable way. You're probably right, Bob. > Sure you can hack around them in some hackish way. But > I do not think it is a good idea to do so since the hack will almost > certainly come back to haunt you at some time in the future. > Therefore I suggest addressing the issue at the source of the problem > by restructuring it such that this problem is entirely avoided. > > Is there no way to read the data piped data by some method other than > standard input? By using a named pipe or temporary file? Then stdin > will always be available for interactive use. This would be a radical solution. We are already trying to see whether this is possible: see http://bugs.debian.org/662983#45 > > I am sorry but not being familiar with the structure requires me to > ask some questions by which I hope the answers would lead someone to a > better solution. What is the root underlying reason for reading stdin > for the data? What is the framework which lead to that data flow > design? The constraints come from the apt Pre-Install-Pkgs hook info protocol version 2, which is used by Apt (and compatible package managers) to provide information (about packages being installed/upgraded/downgraded/removed) to commands executed through the Pre-Install-Pkgs hook mechanism. Please see: http://bugs.debian.org/662983#40 apt.conf(5) man page http://bugs.debian.org/627188#68 Anyway, thanks a lot for your kind reply! -- http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt New GnuPG key, see the transition document! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
Attachment:
pgpkWMPxFCBsA.pgp
Description: PGP signature