Bug 12136

Summary: 'tar x -O -v' mixes verbose messages with extracted content
Product: Busybox Reporter: dispose
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: major CC: busybox-cvs
Priority: P5    
Version: 1.31.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description dispose 2019-08-22 20:35:43 UTC
try

docker run --rm -ti busybox   (or alpine with busybox 1.28.x)

> cd /etc
> tar cvfz /test.tgz group
> tar x -Oz -v -f  /a.tgz  > /tmp/groups-ex
> # tar prints no messages here
> cat /tmp/groups-ex
root:x:0:
......
nogroup:x:65534:
group
> 
# text group was stored in the file


expected behaviour: 
> tar x -Oz -v -f  /a.tgz  > /tmp/groups-ex
prints 'group' on the screen, extracted file goes into the /tmp/groups-ex

Seems logic is present in tar.c#447, but it does not work as expected.