On Thu, Apr 02, 2009 at 03:37:44PM -0700, Brock Pytlik wrote: > [email protected] wrote: >> On Thu, Apr 02, 2009 at 06:15:02PM -0400, Dave Miner wrote: >> >>> "pkg install" and uninstall already have --no-index. We need to >>> instruct people to use it when installing things on the CD >>> environment, of course. >>> >> >> Perhaps I'm out of the loop already, but I thought we discussed a >> solution to this problem at yesterday's pkg iteam meeting. >> >> The consensus that I thought we reached was that local search indices >> won't be built by default. When the user performs a local search, we'll >> print a message stating that local search performance is degraded. If >> better performance is desired, the user can create a local search index >> by invoking the proper command. Once local indices exist, pkg(5) will >> continue to update them. >> >> In this case, users wouldn't need the --no-index option, since the >> default behavior doesn't create a local index. The only catch is that >> the folks who create the install CD must make sure that no local index >> is present on the disc, otherwise pkg will try to rebuild it. >> >> > This is the new (as of yesterday), hoped for behavior. I'm still working > on getting that implemented (and hitting some interesting behavior along > the way). One modification I made to the proposal was that if an image > is empty and is being installed into for the first time (think a newly > created user image), then we do build the index. So, the behavior I'm > currently looking at implementing is: > 1) If the index exists, update it. > 2) If the index doesn't exist and no packages are present in the image, > set up the empty index then update it. (This is fast) > 3) If the index doesn't exist but the image has packages, don't index. > > This indexing behavior will also be present in PackageManager. > > I think this addresses the issues for installing and searching for > PackageManager and the cli. Please let me know if I've overlooked > something.
Just a couple further thoughts on your proposal. It may be advantageous to provide a command-line or API option to remove an existing index. (I don't know what interface the installer is using.) At least this way, there won't be a corresponding installer change required if you later change the format / on-disk layout of the local index. Case #2 is fast, but how much overhead does #1 add as the user performs small operations. IIRC, you modified local search to journal its updates, right? -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
