Bug 3358
Summary: | cpio verbose output is on stderr instead of (SVR4) stdout | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | eczema |
Component: | cpio | Assignee: | bero |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1999-12-17 18:54:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
eczema
1999-06-09 10:11:53 UTC
I'm not sure what the problem is here. Linux uses GNU cpio which is a different implementation than what "other unix" vendors probably use. I would say that other unix vendors have a problem if they are writing error messages to stdout :-) You can of course do cpio -iv < /dev/nst0 2>&1 > /tmp/log if you wish all messages in the same file. Please reopen with more specific details if there is a problem here. ------- Email Received From Alain.DEGREFFE.be 06/09/99 09:01 ------- OK, I understand now. I'm changing the summary to clarify ... Find here the patch... cpio-2.4.2-stderr-stdout.patch --- cpio-2.4.2/copyin.c Wed Nov 30 23:49:06 1994 +++ cpio-2.4.2/copyin.c Wed Jun 9 17:39:34 1999 @@ -1001,9 +1001,9 @@ } if (verbose_flag) - fprintf (stderr, "%s\n", file_hdr.c_name); + fprintf (stdout, "%s\n", file_hdr.c_name); if (dot_flag) - fputc ('.', stderr); + fputc ('.', stdout); } } --- cpio-2.4.2/copyout.c Wed Jan 10 17:10:45 1996 +++ cpio-2.4.2/copyout.c Wed Jun 9 17:53:45 1999 @@ -492,9 +492,9 @@ } if (verbose_flag) - fprintf (stderr, "%s\n", input_name.ds_string); + fprintf (stdout, "%s\n", input_name.ds_string); if (dot_flag) - fputc ('.', stderr); + fputc ('.', stdout); } } Alain to apply to srpms in patch6 for exemple.... (see cpio SPEC) Find here the patch... cpio-2.4.2-stderr-stdout.patch --- cpio-2.4.2/copyin.c Wed Nov 30 23:49:06 1994 +++ cpio-2.4.2/copyin.c Wed Jun 9 17:39:34 1999 @@ -1001,9 +1001,9 @@ } if (verbose_flag) - fprintf (stderr, "%s\n", file_hdr.c_name); + fprintf (stdout, "%s\n", file_hdr.c_name); if (dot_flag) - fputc ('.', stderr); + fputc ('.', stdout); } } --- cpio-2.4.2/copyout.c Wed Jan 10 17:10:45 1996 +++ cpio-2.4.2/copyout.c Wed Jun 9 17:53:45 1999 @@ -492,9 +492,9 @@ } if (verbose_flag) - fprintf (stderr, "%s\n", input_name.ds_string); + fprintf (stdout, "%s\n", input_name.ds_string); if (dot_flag) - fputc ('.', stderr); + fputc ('.', stdout); } } Alain to apply to srpms in patch6 for exemple.... (see cpio SPEC) sorry reload cause this double sending... oops :-) Alain The single unix spec is actually quite explicit about what should be happening: STDOUT When the -o option is used, the standard output is an archive file formatted as specified by pax with the -x cpio option. Otherwise, the standard output contains commentary in an unspecified format concerning the progress of the execution. STDERR When the -o option is not used, the standard error contains commentary in an unspecified format concerning the progress of the execution. Otherwise, the standard error is used only for diagnostic messages. Fixed in cpio-2.4.2-13. Thanks for the patch. This patch has been reverted because GNU cpio appears to be conformant to the Single Unix Specification without the patch, and the patch caused other breakage (see #6376, #7538). Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/73fa36753957122e9af7dd034c99af2cb4ef7d62 Merge pull request #3522 from gabemontero/issue3358 Merged by openshift-bot |