#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# 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]
#
# CDDL HEADER END
#
#
#
"""module describing a (symbolic) link packaging object
This module contains the LinkAction class, which represents a link-type
packaging object."""
import errno
import os
import six
import stat
from . import generic
"""Class representing a link-type packaging object."""
__slots__ = []
"""Client-side method that installs a link."""
# Don't allow installation through symlinks.
# XXX The exists-unlink-symlink path appears to be as safe as it
# gets to modify a link with the current symlink(2) interface.
"""Returns a tuple of lists of the form (errors, warnings,
info). The error list will be empty if the action has been
correctly installed in the given image."""
if abort:
assert errors
"""Removes the installed link from the system. If something
other than a link is found at the destination location, it
will be removed or salvaged."""
"""Generates the indices needed by the search dictionary. See
generic.py for a more detailed explanation."""
rval = [
None),
]
if k.startswith("mediator")
)
return rval
"""Performs additional validation of action attributes that
for performance or other reasons cannot or should not be done
during Action object creation. An ActionError exception (or
subclass of) will be raised if any attributes are not valid.
This is primarily intended for use during publication or during
error handling to provide additional diagonostics.
'fmri' is an optional package FMRI (object or string) indicating
what package contained this action."""
"mediator-implementation", "mediator-priority"))
if errors:
return
"provided when mediator-version, "
"mediator-implementation, or mediator-priority "
"is specified")))
elif mediator is not None and \
if not valid:
if not (med_version or med_implementation):
"mediator-implementation must be provided if a "
"mediator is specified")))
if med_version is not None and \
if not valid:
if med_implementation is not None and \
if not valid:
error))
if med_priority is not None and \
if not valid:
if errors: