Brock,
This seems like a good design and will certainly be helpful, especially the parts about updating the catalog on set-authority commands.

One question: for image-update, you say, "For each installed package, if it was installed with a specific authority..." How will this be determined? From what I've been able to tell, the "installed" file is written exactly the same whether a package is installed with or without an authority being specified on the command line. And I don't see anywhere else where the authority for a package is saved. Would this design involve a change to the format of the installed file?

Tom


Brock Pytlik wrote:
Several bugs have been filed about pkg not automatically updating its catalog at the right times (1540[1]) or having issues because and authority isn't available when it's needed (1331[2], 2886[3]). I've also heard from Bart that catalogs should be updated on any pkg command which would change the installed packages. I'd like to gather thoughts on this plan to make sure I'm headed in the right direction.

Whenever an authority is created or its origin changed, we should attempt to update the catalog for the new repository or origin. If the update fails, we'll leave the changes in place, but print out a warning message. If the origin was changed, the warning message will include previous origin. If the preferred authority changes, I think we should probably refresh the catalog of the new preferred authority as well.

For pkg install:
1) If a fmri with the version including the timestamp is given, no catalog refresh will be done.

2) Else: If the fmri specifies an authority or the package was previously installed from a specific authority, then that authority's catalog will be refreshed, but no others will. If that authority is unavailable, installation will fail.

3) Else: The catalogs for the preferred authority and the authority the package was previously installed from will be refreshed. If neither authority is available, the install will fail. If at least one of the authorities is available, then installation will proceed.


For pkg image-update:
A list of authorities requiring refresh and a list of authorities which are optionally updated will be created. For each installed package, if it was installed with a specific authority (case 2 above) then the authority is required to be refreshed. Authorities from case 3 will fall into the optional list. The preferred authority is always added to the required list.

In order for the image-update to proceed, the catalogs of all authorities in the required list must be successfully refreshed. Attempts will be made to update the catalogs of the authorities in the optional list, but failure will not derail the image-update.

Possible additional behavior available via command flags:
Allow image-update to proceed even if not all authorities in the required list are available. Provide a specific list of authorities which are the only authorities that should be consulted for the image-update.

So that's the current idea. Please let me know what you think.

Thanks,
Brock

[1] http://defect.opensolaris.org/bz/show_bug.cgi?id=1540
[2] http://defect.opensolaris.org/bz/show_bug.cgi?id=1331
[3] http://defect.opensolaris.org/bz/show_bug.cgi?id=2886
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;SWI Install/Update Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard

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

Reply via email to