[Yum] URL encoding (plus signs in the RPM name)

Bradley Dunn bradley at dunn.org
Thu Nov 20 01:42:35 UTC 2003


Has anyone else encountered issues with RPMs that have a plus sign, '+', 
in the RPM file name?

When I do a 'yum list' on my repository, it chokes on gtk+:

localhdrpath= /var/cache/yum/test/headers/gtk+-1-1.2.10-22.i386.hdr for 
gtk+ i386
getting /var/cache/yum/test/headers/gtk+-1-1.2.10-22.i386.hdr
failover: baseURL = https://192.168.3.26:8088/RPMS/
failover: path = /headers/gtk+-1-1.2.10-22.i386.hdr
retrygrab() failed for:
   https://192.168.3.26:8088/RPMS//headers/gtk+-1-1.2.10-22.i386.hdr
   Executing failover method
failover: out of servers to try
Error getting file 
https://192.168.3.26:8088/RPMS//headers/gtk+-1-1.2.10-22.i386.hdr
[Errno 4] IOError: HTTP Error 404: /headers/gtk -1-1.2.10-22.i386.hdr

As you can see from the HTTP Error 404, the web server is translating 
the plus sign to a space and then of course it does not find the file. 
The web server is Tomcat.

The fix seems to be to have yum encode the URL (change the plus sign to 
%2B) before requesting it from the web server. I know little about 
Python, but it looks like running the URL through the urllib.quote() 
function would work.

Has anyone else seen this and found a workaround or should I look at 
modifying the source?

Thanks,
Bradley




More information about the Yum mailing list