Bug 870 - redesign needed for context-sensitive actions
: redesign needed for context-sensitive actions
Status: ACCEPTED
Product: pkg
actions
: unspecified
: Other Solaris
: P4 normal (vote)
: ---
Assigned To: pkg/actions watcher
: pkg/actions watcher
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-03-26 18:37 UTC by Bart Smaalders
Modified: 2010-02-03 18:48 UTC (History)
0 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Bart Smaalders 2008-03-26 18:37:52 UTC
I resync'd w/ the work done for 

160 Make IPS cross-platform for use across other supported OS's

and was disappointed to see code of the form:

try:
        from pkg.cfgfiles import *
        have_cfgfiles = True
except ImportError:
        have_cfgfiles = False

and 

        def install(self, pkgplan, orig):
                """client-side method that adds the user...
                   update any attrs that changed from orig
                   unless the on-disk stuff was changed"""

                if not have_cfgfiles:
                        # the user action is ignored if cfgfiles is not
available
                        return

this is a very clumsy, ad-hoc hack to disable user and group actions.  What
happens when the service action appears?  What about other Solaris-specific
features?  How are Windows only actions going to be handled?  Are we shipping
registry-editing actions on Solaris that are disabled if there's no C: drive?

How about designing per-platform actions?  By the way, you missed also
disabling
hardlink and link actions which don't work on windows either according to my
python docs.

Please folks, rethink the way you did this.  This doesn't scale.
Comment 1 Tom Mueller 2008-05-07 06:47:24 UTC
This problem is not just limited to Solaris vs. non-Solaris. The resolution to
this issue needs to allow consider these problems with actions in various
contexts:

- user/group attributes on file actions don't make sense for a non-root user
installing into a user image
- driver actions don't make sense for non-root user or a zone
- it's not clear what the semantics should be for user/group actions in a user
image
- the legacy action doesn't make sense for non-Solaris or non-root user
- SMF (future) does not make sense for non-Solaris or non-root user, however,
it may be useful to have a more generalized "service registration" or "run at
image initialization" type action which could be well-defined for other
operating systems and possibly for a non-root user.
Comment 2 Tom Mueller 2009-05-07 06:11:53 UTC
Not needed for 2009/06. Lowering priority to P4.
Comment 3 Tom Mueller 2009-10-07 18:13:17 UTC
CR available here: http://cr.opensolaris.org/~tmueller/ips-11785/
Comment 4 Tom Mueller 2009-10-07 18:14:30 UTC
Please ignore the previous comment. (Got bit by the auto advancing "feature" of
bugzilla.)