Bug 212419 - --pipe doesn't work for "more"
Summary: --pipe doesn't work for "more"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-26 18:36 UTC by Kim Lux
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-09 20:17:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kim Lux 2006-10-26 18:36:29 UTC
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-27 00:08:32 UTC
Why bother with --pipe?

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

NOTABUG

Comment 2 Kim Lux 2006-10-28 23:38:26 UTC
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-29 01:05:09 UTC
The --pipe option works for what it was intended for. E.g.


Comment 4 Jeff Johnson 2006-10-29 01:08:10 UTC
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-29 01:17:06 UTC
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 20:17:46 UTC
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.