Problem with RPM::Interactive=false when running apt-rpm through a pipe

Logan Rathbone rathbonel at phoenuxos.com
Sat Aug 5 17:30:46 PDT 2006


Dear Panu and the other followers of the apt-rpm mailing list:

I've noticed a strange problem with the latest apt-rpm (lorg3.2) in 
combination with rpm 4.4.5 -- I am not exactly sure what has gone wrong, 
but previously with rpm 4.2 and apt cnc7 I was not experiencing this 
problem.  Here goes...

When RPM::Interactive=false, apt sends the options "-Uv" and "--percent" 
to rpm.  This gets apt/rpm to spit the percentage numbers line-by-line 
to STDOUT (or so I thought).  And indeed, this works when running, for 
instance, "apt-get -o RPM::Interactive=false install foobar" -- but with 
the above command piped to 'cat' (as in "apt-get -o 
RPM::Interactive=false install foobar |cat"), the percentages do not 
show up, and output is given to STDOUT as though --percentage were 
nonexistent.

At first I thought, "ah, RPM must have changed its behaviour with this 
option wrt pipes" -- but then I tried "rpm -Uvh --percent somerpm.rpm 
|cat" and the percentage numbers showed up just fine.

This behaviour working is sort of important to me since I have written a 
Perl-Qt program that acts as a GUI frontend for apt-rpm, but the 
progress dialogs do not work if I can't have these percentage numbers 
properly sent to STDOUT whilst following the apt-rpm process with my 
Perl-Qt program.

I realise that this is a rather long-winded and probably confusing "bug 
report" -- feel free to ask follow-up questions if you would like me to 
clarify something.  I would really like to try to assist you in getting 
this working.

Thanks!
--Logan



More information about the Apt-Rpm mailing list