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

Re: ocaml library to fetch network files ?



On Tue, Sep 16, 2003 at 12:41:13PM +0200, Goswin von Brederlow wrote:
> Sven Luther <sven.luther@wanadoo.fr> writes:
> 
> > On Tue, Sep 16, 2003 at 09:28:08AM +0200, Stefano Zacchiroli wrote:
> > > On Mon, Sep 15, 2003 at 11:05:37PM +0200, Sven Luther wrote:
> > > > Do some of you know if there is already an ocaml library packaged which
> > > > enables to get files over the network, with a given url, a bit like wget
> > > > does.
> > > > 
> > > > I guess one of Stefano's packages does this, i will look at them.
> > > 
> > > There is libnetclient-ocaml-dev, but it works just with HTTP. Otherwise
> 
> Is that any good? Does it have keep-alive and can work asynchronously?
> I was thinking of forking wget to do http downloading and an ftp
> client for ftp.

Mmm,

> > Should do for now, altough i was not sure from a quick overview
> > yesterday, nor from downloding the source and reading its doc.
> > HTTP is enough for now, since the aim is to write a small tool to parse
> > Sources and other such files, and fetch all the source packages from
> > snapshot.debian.net corresponding to an installed debian system.
> 
> If you wait a bit the new debmirror will do that for you or most of
> it.

Well i needed it for last friday, so ... It is needed for generating the
source iso of a ppc install image we are distributing.

> I have downloading of files with rsync, md5sum/size checks and all the
> parsing of Release/Packages/Sources files done. Working on the
> conffile parsing now.

Interesting. Is it implemented in ocaml ?

> For the debian-installer I have a mode that will take a list of
> packages (from debootstrap) and make a mirror with just that
> subset. Getting it to use "dpkg --get-selections" instead should be
> quite simple.

Also nice.

> What exactly do you want to fetch? Or rather what repository?
> Using a yyyy/mm/dd/ repository for sources would be easy.

Well, i go to the archive/package/... archive, download the source list
of all versions of a given package, pick the corresponding yyy/mm/dd
directory and the list of files, combine it and download the
corresponding files. I don't really have a problem in generating a wget
script for this last case, but i have to download the intermediary per
package sources files to get the exact snapshot date for a given
package.

> > > there are the bindings to libcurl, but they aren't yet packaged.
> > 
> > We could package it, who is upstream to this ?
> 
> Oh, by the way, the new debmirror is even in ocaml. :)

Ok, that responds to the earlier question then. Is it already available
somewhere then, if yes, i could have a look, and not duplicate work or
something. Maybe even expand it to have it do what i want and submit the
patches to you.

And err, if you need a sponsor, just ask me.

Friendly,

Sven Luther



Reply to: