Bug 212419 - --pipe doesn't work for "more"
--pipe doesn't work for "more"
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-26 14:36 EDT by Kim Lux
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-09 16:17:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Kim Lux 2006-10-26 14:36:29 EDT
Description of problem: --pipe more doesn't work

Version-Release number of selected component (if applicable):

rpm --version
RPM version 4.4.2

How reproducible:

Every time


Steps to Reproduce:

1. get an rpm command that produces lots of output.  I recently had a install 
where some users and groups were missing and it scrolled pages of output.  I 
was running in a non graphical terminal, so it was frustrating trying to get 
the output. 

2. I ran rpm -i --pipe more something.rpm
  
Actual results:

I expected the output of rpm to be piped to more so that I could page through 
the errors.  It wasn't.  It was frustrating at the time.

Expected results:

Should have been piped to more ?

I got around the problem by doing rpm -i something.rpm 2 > output.txt

Thanks.
Comment 1 Jeff Johnson 2006-10-26 20:08:32 EDT
Why bother with --pipe?

Try this instead:
    rpm -i ... 2>&1 | more

NOTABUG
Comment 2 Kim Lux 2006-10-28 19:38:26 EDT
I know that the outputs can be redirected to more.  But why doesn't --pipe work
for more ?  If it doesn't work as advertised, then shouldn't it be deleted from
the man page ?  If it doesn't work with more, isn't that a bug, even though
there is a work around ?  Just because there is a work around doesn't mean it
isn't a bug.
Comment 3 Jeff Johnson 2006-10-28 21:05:09 EDT
The --pipe option works for what it was intended for. E.g.
Comment 4 Jeff Johnson 2006-10-28 21:08:10 EDT
The --pipe option works for what it was intended for. E.g.
    rpm -qa --last

Meanwhile,  "... 2>&1 | more" works for what it was intended for as well.

The issue is likely more's detection of whether it is attached to a tty, not otherwise.
There's certainly nothing exotic or different about rpm's --pipoe implementation.
Comment 5 Jeff Johnson 2006-10-28 21:17:06 EDT
In fact, this command "works" exactly as expected:
    rpm -qa --pipe more

In fact, this command
    rpm -i time-1.7-27.2.2.1.i386.rpm --pipe more
"works" as well, there's just no output on stdout for
more to page.

So I suspect that what you are missing is that --pipe doesn't
handle stderr.

NOTABUG
Comment 6 Panu Matilainen 2007-08-09 16:17:46 EDT
Yup...

> I expected the output of rpm to be piped to more so that I could page through 
> the errors.  It wasn't.  It was frustrating at the time.

--pipe does what it's intended to do, but would be nice if the errors got logged
someplace (bug #203796)

Note You need to log in before you can comment on or make changes to this bug.