Bug 124867 - wget --exclude-directories option is ignored.
wget --exclude-directories option is ignored.
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Karsten Hopp
:
: 145362 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-31 12:57 EDT by Chris Winne
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-08 11:00:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Winne 2004-05-31 12:57:31 EDT
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 06:44:22 EST
*** Bug 145362 has been marked as a duplicate of this bug. ***
Comment 2 Cristiano Duarte 2005-02-15 13:17:02 EST
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-17 20:41:47 EDT
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 11:47:41 EDT
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.

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