hardlink.py revision 3158
0N/A# The contents of this file are subject to the terms of the 0N/A# Common Development and Distribution License (the "License"). 0N/A# You may not use this file except in compliance with the License. 0N/A# See the License for the specific language governing permissions 0N/A# and limitations under the License. 0N/A# When distributing Covered Code, include this CDDL HEADER in each 0N/A# If applicable, add the following below this CDDL HEADER, with the 0N/A# fields enclosed by brackets "[]" replaced with your own identifying 0N/A# information: Portions Copyright [yyyy] [name of copyright owner] 0N/A# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. 0N/A"""module describing a (hard) link packaging object 0N/AThis module contains the HardLinkAction class, which represents a hardlink-type 0N/A """Class representing a hardlink-type packaging object.""" 0N/A """ return a path for target that is relative to image""" 0N/A # paths are either relative to path or absolute; 0N/A # both need to be passed through os.path.normpath to ensure 0N/A # that all ".." are removed to constrain target to image 0N/A """Client-side method that installs a hard link.""" 0N/A # Don't allow installation through symlinks. 0N/A # User or another process has removed target for 0N/A # hardlink, a package hasn't declared correct 0N/A # dependencies, or the target hasn't been installed 0N/A """Returns a tuple of lists of the form (errors, warnings, 0N/A info). The error list will be empty if the action has been correctly installed in the given image.""" # We only allow hard links to regular files, so the hard # link should lstat() as a regular file. # No point in continuing if no target "inodes not the same").
format(