[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dynamic partial mirror, apt-get fails

Hi everybody,

I am trying to implement a cgi script for mirroring a small part of a 
large collection of files (the debian distribution). The idea is to 
mirror only those files which are requested, by downloading them "on the 
fly" when the clients request them. Requests in the form "wget 
work fine already. The script get.cgi verifies if the file exists. If it 
exists, the script simply sends a "Location: ..." directive to its 
standart output and exists. If the file does not exist, the script 
downloads it from one of several predefined locations, and after the 
downloading process has succeeded it sends a "Location: ..." directive to 
its standard output and exits.

This is more or less what apt-proxy (and other proxies) do, except that 
my script is independent of the directory structure (it should work for
any collection of files, not only for the debian distribution) and it can 
be run by an ordinary user (you don't have to be root in order to install 

Now, the problem is that the debian package manager (dselect or apt-get) 
does not work exactly like wget. Requests in the form "apt-get 
http://..."; fail with the strange message "302 Found". I looked a little 
bit into the source of both wget and apt-get and it seems to me that wget 
has code which deals specifically with the "Location: ..." directive, 
while apt-get has not.

The questions are: Is my conclusion above correct ? Are future versions 
of apt-get going to accept "Location: ..." directives ? Should I try and 
modify the source of apt-get in order to teach it to handle these 
directives ?

You can find all the details about my problem at my web page:
http://cmaf.ptmat.fc.ul.pt/~barbaros -> english -> computers and 
programming -> deb_part_mirr

Thank you. Cristian Barbarosie 

Reply to: