[csw-users] package management
Christopher Odenbach
odenbach at uni-paderborn.de
Tue Oct 23 17:22:19 CEST 2007
Hi,
> ok I think I translated the comments find attached a copy of your code with the
> rather poor english translations. In addition could you give me a high level
> descussion of what your code attempts to do. Nothing to detailed just
> wondering about the
> overall strategy... I have an good idea of what you are trying to do
> just what to make sure I don't miss any major points or problems you
> might have faced.
OK, here we go:
Assumptions:
- pkg-get only supports one repository
- we want to be able to install our own packages (or other non-blastwave
packages) with pkg-get
- to do so we
- create a local mirror (with rsync), that gets updated regularly
- create a local repository for the packages we want to mix in
- create a repository that contains nothing but symbolic links to all
the packages in the blastwave mirror and in our own repository
- create catalog and description file for the mix directory so that it
can be used as a pkg-get repository
Comments to the script:
- $basedir is the basedir where all repositories can be found
- $collections is a hash that defines, which repositories should be
mixed together. In the example, the collection '$basedir/stable' is made
from $basedir/csw/stable, $basedir/upb, $basedir/sun and $basedir/packages.
- mix_sources is the main function that does everything (just to make
alle the variables local instead of global)
- link_new_packages creates the symbolic links from one dir to the
other. If it finds new packages to link, it recreates the catalog and
description files for this particular source.
- catalog and description are read into a hash which is then written out
into the destination dir (to prevent multiple versions of one package)
- generate_catalog reads in all packages and creates the md5sums. It
contains a small hack: Original Sun packages have package names that
contain spaces, so the package name is set to SUNWxyz.
- relatove_path just constructs the relative path to come from dir a to
dir b.
- remove_dangling_symlinks removes symlinks that point to a non-existing
package
Did this help a little?
Christopher
--
======================================================
Dipl.-Ing. Christopher Odenbach
Zentrum fuer Informations- und Medientechnologien
Universitaet Paderborn
Raum N5.122
odenbach at uni-paderborn.de
Tel.: +49 5251 60 5315
======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opencsw.org/pipermail/users/attachments/20071023/68c31a19/attachment.asc>
More information about the users
mailing list