Bug 1337864 - tar 1.29 changes --exclude behavior, causes breakage
Summary: tar 1.29 changes --exclude behavior, causes breakage
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tar
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1381187 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-20 09:49 UTC by Panu Matilainen
Modified: 2016-10-03 11:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-20 19:27:03 UTC
Type: Bug


Attachments (Terms of Use)

Description Panu Matilainen 2016-05-20 09:49:51 UTC
Description of problem:

Discovered when building DPDK in todays rawhide; it suddenly fails with "Installed (but unpackaged) file(s) found". DPDK makefiles use tar to copy files on "make install" and while doing so, it filters out some unwanted cruft with --exclude. That filtering no longer works with tar 1.29.

Version-Release number of selected component (if applicable):
tar 1.29-1

How reproducible:
Always

Steps to Reproduce:
1. mkdir -p tartest/app
2. touch tartest/app/{bing,bang,dong,kong}
3. tar cfv tartest.tar -C tartest app --exclude 'app/b*'

Actual results:
app/
app/bing
app/bang
app/dong
app/kong

Expected results:
app/
app/dong
app/kong

Additional info:
It appears that between tar 1.28 and 1.29, the order has become significant, moving the --exclude before "app" makes it behave as expected:
[pmatilai@sopuli ~]$ tar cfv tartest.tar -C tartest --exclude 'app/b*' app
app/
app/dong
app/kong

Such a thing *could* of course be an intentional change but I dont see anything in the 1.29 release notes at least, and in any case such changes tend to break somebodys scripts, as witnessed here.

Comment 1 Pavel Raiskup 2016-05-20 19:27:03 UTC
(In reply to Panu Matilainen from comment #0)
> Additional info:
> It appears that between tar 1.28 and 1.29, the order has become significant,
> moving the --exclude before "app" makes it behave as expected:
> [pmatilai@sopuli ~]$ tar cfv tartest.tar -C tartest --exclude 'app/b*' app
> app/
> app/dong
> app/kong
> 
> Such a thing *could* of course be an intentional change but I dont see
> anything in the 1.29 release notes at least, and in any case such changes
> tend to break somebodys scripts, as witnessed here.

Thanks for the report, but this is intentional (upstream decision), not a bug.
The --exclude is position-sensitive option, it is pity this is not in
announcement, but it is definitely in ChangeLog and git-log, also documented
in info page.

Comment 2 Panu Matilainen 2016-05-23 05:30:43 UTC
Doh, I checked the man page and the announce but not the two places where it IS mentioned :) Anyway, thanks for confirming it is an intentional change.

Comment 3 Pavel Raiskup 2016-10-03 11:27:28 UTC
*** Bug 1381187 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.