Bug 604724

Summary: Urlgrabber command line program can't download certain urls, plus some other bugs
Product: Red Hat Enterprise Linux 6 Reporter: Petr Šplíchal <psplicha>
Component: python-urlgrabberAssignee: James Antill <james.antill>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Šplíchal <psplicha>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: azelinka, ohudlick
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-urlgrabber-3.9.1-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:23:44 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:
Bug Depends On:    
Bug Blocks: 519903, 580448, 609517    

Description Petr Šplíchal 2010-06-16 15:17:43 UTC
Description of problem:

I was trying to download a file with the command line tool
urlgrabber with no success:

# rpm -q python-urlgrabber
python-urlgrabber-3.9.1-6.el6.noarch
# mkdir /tmp/urlgrabber
# cd /tmp/urlgrabber/
# urlgrabber http://www.redhat.com/
# echo $?
0
# ls -l
total 0
# urlgrabber -o file.html http://www.redhat.com/
ERROR: cannot use -o when grabbing multiple files
# urlgrabber http://www.redhat.com/ file.html
[Errno 2] Local file does not exist: /tmp/urlgrabber/file.html
# ls -l
total 0

The tool works fine in RHEL5, although with a different syntax:
# rpm -q python-urlgrabber
python-urlgrabber-3.1.0-5.el5.noarch
# urlgrabber http://www.redhat.com/ file.html
file written to file.html
# ls -l
total 24
-rw-r--r-- 1 root root 19900 Jun 16 11:14 file.html

Comment 3 James Antill 2010-07-01 15:18:13 UTC
There appears to be a couple of bugs here:

1. automatic filenames are broken for directories (eg. http://www.redhat.com/) it picks '' as the filename. You can still use: http://www.redhat.com/index.html.

2. Arg. checking for using -o with multiple args. is broken, -o X Y is counted as two download urls.

3. There's no long option for outputfile name.

4. urlgrabber tracebacks if you give it an option it doesn't recognize.

 
...I don't mind fixing all of them for 6.0, it's just I'm not sure how important they are testing functionality like:

urlgrabber -p http://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/repodata/1bc00e0f693f21eea9cdf0837f78ad1ae04a1fab991e42103f98abd74d2b7d66-comps-f13.xml.gz

...works fine.

Comment 7 releng-rhel@redhat.com 2010-11-10 21:23:44 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.