Hi All,

During tonight's LOSUG meeting I have mentioned that I have put
together a nasty ips repo mirror script (attached).

It makes a lot of assumptions, is is slow but works most of the time.
It even preserves the timestamps due to the primitive nature of the
way how it operates.

What the script is doing is it downloads all of the manifests that are
not present in the target directory from the remote repository. It
will also remove any local manifests if necessary. After downloading
the manifests the script generates the list of files/blobs required by
the packages. It compares it to the list of files present on the local
filesystem and makes any necessary updates (downloads missing
file/removes uneeded files). The script places the manifests and the
files into the same locations pkg.depotd expects them to be at. If
there were any changes to the remote repository then the script
removes all files from the target dir except pkg/ and files/
directories. With only those two present it is possible to start
pkg.depotd with the --rebuild command-line option. pkg.depotd would
re-generate the indexes, etc. and start serving the packagesy.

It is wise to re-start the pkg.depod later with the --readonly
parameter. It is also required to stop pkg.depotd before starting the
mirror script again.

Regards,

Andrzej

Attachment: ips-mirror.sh
Description: Bourne shell script

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to