pkgplan.py revision 2261
248N/A# The contents of this file are subject to the terms of the 248N/A# Common Development and Distribution License (the "License"). 248N/A# You may not use this file except in compliance with the License. 248N/A# See the License for the specific language governing permissions 248N/A# and limitations under the License. 248N/A# When distributing Covered Code, include this CDDL HEADER in each 248N/A# If applicable, add the following below this CDDL HEADER, with the 248N/A# fields enclosed by brackets "[]" replaced with your own identifying 248N/A# information: Portions Copyright [yyyy] [name of copyright owner] 248N/A# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 248N/A """A package plan takes two package FMRIs and an Image, and produces the 248N/A set of actions required to take the Image from the origin FMRI to the 248N/A If the destination FMRI is None, the package is removed. 248N/A "actions",
"check_cancelation",
"destination_fmri",
"image",
690N/A "origin_fmri",
"pkg_summary",
"__destination_mfst",
248N/A "__license_status",
"__origin_mfst",
"__progtrack",
248N/A "__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. # Since user removed publisher, assume this is # the same as if they had set signature-policy # ignore for the publisher. # Only perform signature verification logic if # there are signatures or if signature-policy # 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