directory.py revision 1713
565N/A# The contents of this file are subject to the terms of the 565N/A# Common Development and Distribution License (the "License"). 565N/A# You may not use this file except in compliance with the License. 565N/A# See the License for the specific language governing permissions 565N/A# and limitations under the License. 565N/A# When distributing Covered Code, include this CDDL HEADER in each 565N/A# If applicable, add the following below this CDDL HEADER, with the 565N/A# fields enclosed by brackets "[]" replaced with your own identifying 565N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2614N/A# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 926N/A# Use is subject to license terms. 1050N/A"""module describing a directory packaging object 926N/AThis module contains the DirectoryAction class, which represents a 926N/Adirectory-type packaging object.""" 2034N/A """Class representing a directory-type packaging object.""" 2524N/A """Client-side method that installs a directory.""" 2524N/A # XXX Hack! (See below comment.) 2524N/A # The downside of chmodding the directory is that as a non-root 2524N/A # user, if we set perms u-w, we won't be able to put anything in 2524N/A # it, which is often not what we want at install time. We save 2524N/A # the chmods for the postinstall phase, but it's always possible 2524N/A # that a later package install will want to place something in 2524N/A # this directory and then be unable to. So perhaps we need to 2524N/A # (in all action types) chmod the parent directory to u+w on 2524N/A # failure, and chmod it back aftwards. The trick is to 2524N/A # recognize failure due to missing file_dac_write in contrast to 2524N/A # other failures. Or can we require that everyone simply have 2524N/A # file_dac_write who wants to use the tools. Probably not. 1710N/A """Returns a tuple of lists of the form (errors, warnings, 1710N/A info). The error list will be empty if the action has been 1710N/A correctly installed in the given image.""" 1710N/A # cannot remove directory since it's 1710N/A """Generates the indices needed by the search dictionary. See 565N/A (
"directory",
"basename",