Bug 416661 - Meaning of --occurrence wrong in man page
Meaning of --occurrence wrong in man page
Product: Fedora
Classification: Fedora
Component: tar (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Radek Brich
Fedora Extras Quality Assurance
Depends On:
Blocks: 429522
  Show dependency treegraph
Reported: 2007-12-08 13:04 EST by Jonathan Wakely
Modified: 2008-02-17 07:05 EST (History)
0 users

See Also:
Fixed In Version: 1.17-6.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-17 07:05:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for tar.1 man page (693 bytes, patch)
2007-12-08 13:04 EST, Jonathan Wakely
no flags Details | Diff

  None (edit)
Description Jonathan Wakely 2007-12-08 13:04:00 EST
Description of problem:
The man page shipped with RH/Fedora tar (which doesn't exist upstream) gives the
wrong semantics for --occurrence.  It claims --occurrence N will process the
first N occurrences, whereas it should be --occurrences=N and it only processes
the Nth, not 1-N.

Version-Release number of selected component (if applicable):
tar-1.17-4.fc8 and older versions

How reproducible:

Steps to Reproduce:
Compare what "man tar" says about --occurrence with "info tar" or try this:

mkdir tmp || exit 
cd tmp
touch bug

tar cvf bugs.tar bug bug bug
tar --delete -f bugs.tar --occurrence 2 bug
tar tvf bugs.tar

tar cvf bugs.tar bug bug bug
tar --delete -f bugs.tar --occurrence=2 bug
tar tvf bugs.tar

none of the --delete commands do what you would expect from the man page.

Patch attached.
Comment 1 Jonathan Wakely 2007-12-08 13:04:00 EST
Created attachment 282061 [details]
patch for tar.1 man page
Comment 2 Radek Brich 2008-01-21 07:34:36 EST
It will be fixed in F8 and Fdevel. I also cloned this bug for RHEL5.
Thanks for reporting.
Comment 3 Fedora Update System 2008-01-22 10:39:28 EST
tar-1.17-6.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tar'

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