dynamic partial mirror, apt-get fails

B

barbaros

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
http://local.mirror.pt/~debian/cgi-bin/get.cgi?pool/main/a/abcde/abcde.deb"
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 it).

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


--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.

HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top