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