470,588 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,588 developers. It's quick & easy.

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 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:
Jul 18 '05 #1
0 999

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dzemo | last post: by
16 posts views Thread by devicerandom | last post: by
4 posts views Thread by =?Utf-8?B?RHlsYW5TbWl0aA==?= | last post: by
12 posts views Thread by Scott Sharkey | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.