Tom Mueller (pkg-discuss) wrote:
> This proposal regarding action semantics was discussed at a meeting in 
> Menlo Park last Thursday. It's being brought to the list for any further 
> thoughts that people might have.
> 
> Issues addressed:
> 749 pkg verify fails on Windows (and user images in general)
> 870 redesign needed for context-sensitive actions
> 
> Proposed changes:
> 
> 1. The owner and group attributes for the file and directory actions 
> will be made optional. By policy, they will be required for opensolaris 
> packages, but the code will not enforce this. If the owner and group 
> attributes are not present, then the ownership of the file when 
> installed will become whatever the operating system default is for a 
> file created in that directory. For a verify, if the owner and group 
> attributes are not present, then those attributes of the file will not 
> be checked.
> 
> This will require modifying the implementation of the directory and file 
> actions, and the pkg(5) manual page.
> 
> 2. Some actions are valid only in certain contexts. For the purposes of 
> this proposal, a "context" is defined as an environment that effects the 
> semantics of an action. The known contexts are the client operating 
> system type, processor type, zone type (global/non-global) for Solaris, 
> user permissions (admin/nonadmin) and image type (full, partial, user).
> 
> The following actions have limited applicability:
> 
> driver - valid only for Solaris, full image
> group - not valid on Windows, not valid for USER images
> hardlink - not valid on Windows
> legacy - valid only for Solaris
> link - not valid on Windows
> user - not valid on Windows, not valid for USER images

Given the above I believe more appropriate names would be:

opensolaris.driver
posix.group
posix.hardlink
solaris.legacy
posix.link
posix.user

That then allows for:

windows.group
windows.user
windows.driver

> pkg.platform (for the operating system)
>     values: sunos, linux, windows, darwin

do you mean Darwin or MacOS X ?

> pkg.ISA (for the instruction set architecture)
>     values: i386, sparc

shouldn't ppc be included in here as well for the Darwin/MacOS case ?


> 4. When the implementation for an action from one platform to another is 
> significantly different, then the method used in the source code for 
> dealing with this will be to provide an alternate file for the action.  
> The alternate file will be renamed during the build process.  For 
> example, if the driver action was to be supported on Linux, then a 
> driver_linux.py file would be created and this would be renamed to 
> driver.py during the build process, replacing the one used for all other 
> platforms.
> 
>     opensolaris -> driver.py -> driver.py
>     linux -> driver_linux.py -> driver.py

Or do as I'm suggesting above and be explicit about the actions.

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

Reply via email to