Bug 6376 - broken -v option
Summary: broken -v option
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cpio
Version: 6.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: bero
QA Contact:
: 7889 9545 10026 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 1999-10-26 08:18 UTC by Marco Colombo
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-12-17 18:59:45 UTC

Attachments (Terms of Use)

Description Marco Colombo 1999-10-26 08:18:16 UTC
The -v option is ignored when stdout is redirected:
on RHL60:
% echo / | cpio -ov  > /dev/null
1 block
% echo / | cpio -ov -O  /dev/null
1 block

on RHL61:
# echo / | cpio -ov > /dev/null
1 block
# echo / | cpio -ov -O /dev/null
1 block

Please note the missing '/'. This happens also with pipes,
and breaks my backup scripts, BTW.
rpm -qf `which cpio` returns:
cpio-2.4.2-13 on RHL61 and
cpio-2.4.2-12 on RHL60.
I've tried both bash and tcsh, so i don't think it's a shell

Comment 1 Steve Smith 1999-12-15 19:15:59 UTC
Patch cpio-2.4.2-stdout.patch changes copyout.c to write verbose messages (-v)
to stdout instead of stderr.  Not only do you not see these messages when stdout
is redirected, but the output cpio file is corrupted (because the messages are
now part of the cpio file)!  If I rebuild cpio from the sources with all but
this patch applied, it works as expected.

Comment 2 Jeff Johnson 1999-12-17 18:59:59 UTC
Fixed (by reverting the #3358 stdout patch) in cpio-2.4.2-14.

Comment 3 Jeff Johnson 1999-12-19 17:41:59 UTC
*** Bug 7889 has been marked as a duplicate of this bug. ***

Comment 4 Jeff Johnson 2000-02-21 10:39:59 UTC
*** Bug 9545 has been marked as a duplicate of this bug. ***

Comment 5 Frank Elsner 2000-02-23 10:56:59 UTC
Why has the fix of this serios bug not found its way into the Errata ?

Comment 6 Jeff Johnson 2000-03-07 13:54:59 UTC
*** Bug 10026 has been marked as a duplicate of this bug. ***

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