pkgplan.py revision 2205
# See the License for the specific language governing permissions # and limitations under the License. # When distributing Covered Code, include this CDDL HEADER in each # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. """A package plan takes two package FMRIs and an Image, and produces the set of actions required to take the Image from the origin FMRI to the If the destination FMRI is None, the package is removed. "actions",
"check_cancelation",
"destination_fmri",
"image",
"origin_fmri",
"pkg_summary",
"__destination_mfst",
"__license_status",
"__origin_mfst",
"__progtrack",
"__repair_actions",
"__xferfiles",
"__xfersize",
"""Adds a license status entry for the given src and dest 'src' should be None or the source action for a license. 'dest' must be the destination action for a license.""" """Propose origin and dest fmri, manifest""" # self.origin_fmri = None # I'd like a cleaner solution than this; we need to actually # construct a list of actions as things currently are rather than # just re-applying the current set of actions. # Create a list of (src, dst) pairs for the actions to send to # execute_repair. src is none in this case since we aren't # upgrading, just repairing. # Only install actions, no update or remove """ updates a set of installed fmris to reflect """Determine the actions required to transition the package.""" # If new actions are being installed, check the destination # manifest for signatures. # Check that the publisher's CA certs validate against # the image's trust anchors. # figure out how many implicit directories disappear in this # transition and add directory remove actions. These won't # do anything unless no pkgs reference that directory in # Retrieving origin_dirs first and then checking it for any # entries allows avoiding an unnecessary expanddirs for the # destination manifest when it isn't needed. # Stash information needed by legacy actions. # Add any repair actions to the update list # Never assume acceptance for # If src action required acceptance, # then license was already accepted # before, and if the hashes are the # same for the license payload, then # it doesn't need to be accepted again. """A generator function that yields tuples of the form (license, entry). Where 'entry' is a dict containing the license status """Sets the license status for the given license entry. 'plicense' should be the value of the license attribute for the destination license action. 'accepted' is an optional parameter that can be one of three None leaves accepted status unchanged False sets accepted status to False True sets accepted status to True 'displayed' is an optional parameter that can be one of three None leaves displayed status unchanged False sets displayed status to False True sets displayed status to True""" """Perform actions required prior to installation or removal of This method executes each action's preremove() or preinstall() methods, as well as any package-wide steps that need to be taken # Determine if license acceptance requirements have been met as """Download data for any actions that need it.""" """ perform action for installation of package""" # Don't log these as they're expected, and should be """ handle action updates""" # Don't log these as they're expected, and should be """ handle action removals""" # Don't log these as they're expected, and should be """Perform actions required after install or remove of a pkg. This method executes each action's postremove() or postinstall() methods, as well as any package-wide steps that need to be taken # record that package states are consistent