[pkg-discuss] IPS repo mirror script (attached)
Andrzej Szeszo
aszeszo at gmail.com
Wed Aug 20 14:55:50 PDT 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ips-mirror.sh
Type: application/x-sh
Size: 4651 bytes
Desc: not available
URL: <http://mail.opensolaris.org/pipermail/pkg-discuss/attachments/20080820/13060432/attachment.sh>
More information about the pkg-discuss
mailing list