Bug 721389

Summary: fedpkg stdout mixed with stderr when not connected to TTY
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: fedora-packagerAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dcantrell, dennis, rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpkg-1.6-1.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-29 01:39:06 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 Petr Pisar 2011-07-14 13:32:50 UTC
fedpkg-0.5.9.2-1.fc15.noarch

When running fedpkg verrel not connected to TTY (e.g. through pipe from other tool), standard output contains some lines from standard error output. This makes fedkpkg output and underlying (rpmbuild) errors indistinguishable.

Example:

Checkout F-16 tree for `queuegraph' package (queuegraph-1_1-8_fc14-3-g02274d9) and run `fedpkg verrel' with first or second or both descriptors redirected to file and watch difference.


First keep one output on TTY:

$ fedpkg verrel 2>/dev/null
queuegraph-1.1-10.fc16

$ fedpkg verrel 1>/dev/null
sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory
sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory


And now redirect both outputs:

$ fedpkg verrel 1>verrel.out 2>verrel.err 
$ cat verrel.out 
sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory

queuegraph-1.1-10.fc16
$ cat verrel.err
sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory
sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory


As you can see the second case makes scripting fedpkg unhappy as you get the fedpkg answer mixed with other stuff.

Please change fedpkg to get outputs in the second case the same as in the first case.

Comment 1 Jesse Keating 2011-09-08 22:47:16 UTC
I just pushed something to rpkg that fixes this.  It'll get into fedpkg in rawhide when I build it against rpkg.  I'll look at backporting it to f16/f15 too.

Comment 2 Jesse Keating 2011-09-08 23:04:35 UTC
Backported, will be in the next build.

Comment 3 Fedora Update System 2011-09-19 23:06:09 UTC
rpkg-1.5-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/rpkg-1.5-1.fc16

Comment 4 Fedora Update System 2011-09-19 23:08:15 UTC
rpkg-1.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/rpkg-1.5-1.fc15

Comment 5 Fedora Update System 2011-09-19 23:09:03 UTC
rpkg-1.5-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/rpkg-1.5-1.el6

Comment 6 Fedora Update System 2011-09-20 02:33:05 UTC
Package rpkg-1.5-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing rpkg-1.5-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/rpkg-1.5-1.el6
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-09-20 22:04:52 UTC
rpkg-1.6-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/rpkg-1.6-1.fc16

Comment 8 Fedora Update System 2011-09-20 22:10:40 UTC
rpkg-1.6-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/rpkg-1.6-1.el6

Comment 9 Fedora Update System 2011-09-29 01:38:56 UTC
rpkg-1.5-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-09-30 18:33:45 UTC
rpkg-1.6-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.