[indiana-discuss] Distro query
Stephen Hahn
sch at sun.com
Thu Dec 13 21:02:58 PST 2007
* Anil Gulecha <anil.verve at gmail.com> [2007-12-14 02:59]:
> On 12/13/07, Stephen Hahn <sch at sun.com> wrote:
> > * Anil Gulecha <anil.verve at gmail.com> [2007-12-13 13:40]:
> > > *There is no way currently to mirror the data from pkg.opensolaris.org
> > > currently. I am told work is underway to allow this and I'm waiting
> > > for this too.
> >
> > The image packaging "protocol" is a series of GET and POST operations
> > over HTTP. Writing a mirroring program should be a relatively simple
> > exercise in either shell or Python, depending on which API you wish to
> > use. Using the Python APIs will help the image packaging effort have
> > interfaces of higher utility.
> >
> > That is, the data is already available to mirror.
>
> Can you point me to the source that actually parses the catalog and
> creates the link used by GET. If I can generate the link, I'll go
> ahead and write the script up.
Use
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/catalog.py
to parse a catalog, etc. Then use,
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/manifest.py
to understand a manifest. Finally, use
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/client/filelist.py
to retrieve files in groups or
http://src.opensolaris.org/source/xref/pkg/gate/src/modules/client/retrieve.py
to retrieve them singly.
If you'd rather talk about how to do it with a Bourne-style shell and
wget, come over to pkg-discuss and we'll work through it. Might be
best in any case, if you find a poorly designed part of the Python
API.
- Stephen
--
sch at sun.com http://blogs.sun.com/sch/
More information about the indiana-discuss
mailing list