[Yum] Spawning a temporary Yum Server: Header issues

seth vidal skvidal at linux.duke.edu
Wed Apr 26 18:51:56 UTC 2006


On Wed, 2006-04-26 at 14:46 -0400, Jesse Noller wrote:
> This might sound like an oddball issue - but I have an application I
> wish to spawn an internal HTTP Server (Via Python SimpleHTTPServer)
> after executing createrepo on a local directory of RPMS and then tell
> remote hosts to leverage the newly spawned HTTP server as the yum
> server- the layout looks like this:
> 
> packages/
>     ...some rpms
>     repodata (from createrepo)
> 
> I spawn the HTTP server via:
> 
> (Python)
> import SimpleHTTPServer
> import SocketServer
> 
> Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
> httpd = SocketServer.TCPServer(("", 9193), Handler)
> while not StopServ:
>     httpd.handle_request()
> 
> And the client is given a custom yum repo file:
> 
> [updates-released]
> name=Fedora Core $releasever - $basearch - Released Updates
> baseurl=http://10.1.1.108/upgrades/
> enabled=1
> gpgcheck=0
> 
> Now the problem arises when a yum-update is ran, for example, I have a
> Samba update to push:
> 
> [root at foo /etc/yum.repos.d]# yum update
> Setting up Update Process
> Setting up repositories
> updates-released          100% |=========================|  951 B    00:00
> Reading repository metadata in from local files
> Resolving Dependencies
> --> Populating transaction set with selected packages. Please wait.
> ---> Downloading header for samba-common to pack into transaction set.
> samba-common-3.0.20-1.8.2 100% |=========================| 6.2 MB    00:00
> http://192.168.149.108/upgrades/samba-common-3.0.20-1.8.2.arc.i386.rpm:
> [Errno -1] Header is not complete.
> Trying other mirror.
> Error: failure: samba-common-3.0.20-1.8.2.arc.i386.rpm from
> updates-released: [Errno 256] No more mirrors to try.
> 
> I can see the HTTP connections hitting the spawn server - now, I
> suspected this might have been due to the port, so I switched it to
> port 80, that was not it - given there is no proxy between the two,
> and the network is flat, I know that http connections are being
> correctly handled/made.
> 
> I'm using FC4 with the latest revision of createrepo
> (createrepo-0.4.4-1.noarch.rpm) - does anyone have any ideas or
> pointers?
> 

Does the python http server support http byte ranges?

I thought python's built in server was only http 1.0 compatible.

-sv





More information about the Yum mailing list