Bug 124867

Summary: wget --exclude-directories option is ignored.
Product: [Fedora] Fedora Reporter: Chris Winne <bugs>
Component: wgetAssignee: Karsten Hopp <karsten>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 2CC: fedora, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-08 15:00:40 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 Chris Winne 2004-05-31 16:57:31 UTC
Description of problem:
wget

The following command with wget (wget-1.9.1-5) from fedora core 2 soes
not exclude the updates/2/i386/debug directory (probably the SRPMS
directory as well, but I killed it first).

$ wget --verbose --limit-rate=7k -t7 -w7 --random-wait -E -k -K -nH \
--cut-dirs=2 -x -np -m -X */i386/debug/,*/i386/SRPMS/ -a \
/tmp/fedoraN.log ftp://mirrors.kernel.org/fedora/core/updates/2/i386 

Note that the wget binary from wget-1.8.2-15.3.i386 (fedora core 1)
when run in fedora core 2 works find.

Version-Release number of selected component (if applicable):
wget-1.9.1-5

How reproducible:
This is always reproducible.


Steps to Reproduce:
1. Run the above command
2.
3.
  
Actual results:

Begins to download files in excluded directories 

Expected results:

I expect the directories to be excluded.

Additional info:

the binary from version wget-1.8.2-15.3 from fedora core 1 works fine
within fedora core 2.  Note that I am still using a 2.4 (homemade) kernel.

Comment 1 Karsten Hopp 2005-01-18 11:44:22 UTC
*** Bug 145362 has been marked as a duplicate of this bug. ***

Comment 2 Cristiano Duarte 2005-02-15 18:17:02 UTC
I'm experiencing this bug also in FC3 !
This bug is ancient, is there a reason to not fix it ?

Comment 3 Gordon Hopper 2005-04-18 00:41:47 UTC
It appears to be a bug in wget 1.9, not specific to Fedora.  The problem is that
leading "*" wildcards do not match across "/" (directories).  Take a look at the
fnmatch() function in cmpt.c to see why this is so.  I haven't looked at the
history to see when this changed, but it sounds like it works differently in 1.8.2.

# For example, this does not work (the SRPMS directory is downloaded):
wget -nH --cut-dirs=3 --progress=dot --mirror \
-X SRPMS \
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/

# Trying the same thing with a wildcard does not work (this one also downloads
SRPMS):
wget -nH --cut-dirs=3 --progress=dot --mirror \
-X \*/SRPMS \
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/

# However, specifying the full path in the exclude does work (this downloads
nothing):
wget -nH --cut-dirs=3 --progress=dot --mirror \
-X /pub/redhat/linux/enterprise/4/en/os/i386/SRPMS \
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/

Comment 4 Matthew Miller 2005-04-26 15:47:41 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.