Subject: tar -X doesn't accept exact matches
To: None <>
From: Stephen Borrill <>
List: netbsd-users
Date: 06/17/2005 14:06:29
I've noticed that -X (a.k.a. --exclude-from) has broken between 1.6.2 and 
2.0.2. Paths which begin with ./ are only matched if the ./ is missing in 
the exclude file. For example:

ugly 1# tar -tzf etc.tgz > file
ugly 2# head file
ugly 3# tar -tzf etc.tgz -X file

The last command lists all files with 2.0.2, but none with 1.6.2.


ugly 4# sed 's:^\./::' file > file2
ugly 5# tar -tzf etc.tgz -X file2

This gives no output on 2.0.2, i.e. dev/MAKEDEV matches ./dev/MAKEDEV, but 
./dev/MAKEDEV doesn't match ./dev/MAKEDEV

Can someone quickly check this on -current and if it's still there, I'll 
file a PR.