On Fri, Apr 10, 2009 at 11:24:46AM -0700, Bart Smaalders wrote:
>
> While trying to help unbundled folks get into different repos,
> it's become pretty clear that the following approach would make
> life much simpler for everyone, since it gets all the different
> repos to have unbundled pkgs w/ exactly the same timestamps:
>
> 1) publish unbundled pkgs (openoffice, studio, netbeans, etc)
>    into empty repo file:///...
> 2) cpio resulting pkg & file directories into different repo
>    structures w/ pkg/server disabled
>
> and now the tricky part:
>
> 3) restart pkg/server and convince it to rebuild index & catalog
>    w/o causing everyone in the  world to redownload the entire
>    catalog or run into other problems.
>
>
> I know just blowing away catalog and index and restarting works,
> but there are concerns about what happens to the update log.
> What's the right way of doing this?

The catalog rebuild code hasn't changed since our prototype builds of
the pkg depot.  I would modify that routine, but it may not be a perfect
solution.  If you're simply talking about adding packages to a repo and
then rebuilding, this should be straight forward.

The current catalog rebuild code deletes the catalog, updatelog, and
attributes and then re-generates a new catalog.  In order to prevent
clients from having to download a full catalog, it seems possible to
change the rebuild code to look for an existing catalog and add missing
packages to the catalog and updatelog.

The catch is that if you nuke the catalog entirely, then the server will
have to send a full catalog since it has no way of rebuilding the
updatelog.  This approach also won't work if you've removed packages
from the disk and then want to rebuild the catalog.  Clients will get
your incremental additive updates (or the brand new catalog), but when
they look for packages that are no longer present, bad stuff happens.
We'll need a process to remove packages from the catalog for this to
work correctly.

In the future, we could unify the catalog and updatelog, keeping the
timestamps in one place.  This is a more invasive change than modifying
the catalog rebuild logic.  It's also an approach that I'm not keen to
undertake at the same time that we're re-writing the transport code.

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

Reply via email to