SolarisPackageDirBundle.py revision 2639
38N/A# The contents of this file are subject to the terms of the 38N/A# Common Development and Distribution License (the "License"). 38N/A# You may not use this file except in compliance with the License. 38N/A# See the License for the specific language governing permissions 38N/A# and limitations under the License. 38N/A# When distributing Covered Code, include this CDDL HEADER in each 38N/A# If applicable, add the following below this CDDL HEADER, with the 38N/A# fields enclosed by brackets "[]" replaced with your own identifying 38N/A# information: Portions Copyright [yyyy] [name of copyright owner] 2639N/A# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 2276N/A # map the path name to the SVR4 class it belongs to and 2276N/A # scripts this package uses. 2276N/A # A list of pkg.action.AttributeActions with pkginfo 2276N/A # attributes for items that don't map to pkg(5) equivalents 42N/A # Want to access the manifest as a dict. 504N/A # We accept either bz2 or 7zip'd files 504N/A for x
in [
".bz2",
".7z"]:
2304N/A # Remove BASEDIR from a relocatable path. The extra work is 2304N/A # because if BASEDIR is not empty (non-"/"), then we probably 2304N/A # need to strip an extra slash from the beginning of the path, 2304N/A # but if BASEDIR is "" ("/" in the pkginfo file), then we don't 2304N/A # need to do anything extra. 42N/A # Just do the files that remain. Only regular file 42N/A # types end up compressed; so skip them and only them. 338N/A # Files with special characters in their names may not 338N/A # end up in the faspac archive, so we still need to emit 338N/A # the ones that aren't. 40N/A # These are the only valid file types in SysV packages 2456N/A # This relies on the fact that 2456N/A # license actions have their 2456N/A # hash set to the package path. 1420N/A # If any one of the mode, owner, or group is "?", then we're 1420N/A # clearly not capable of delivering the object correctly, so 2304N/A # Add a preserve attribute if klass is known to be used 2304N/A # for preservation. For editable and volatile files, 2304N/A # always do at least basic preservation. 2276N/A # check to see if we've seen this script 2276N/A """Creates a list of pkg.action.AttributeActions corresponding 2276N/A to pkginfo fields that aren't directly mapped to pkg(5) 2276N/A # these keys get converted to a legacy action 2276N/A # parameters defined in pkginfo(4) that we always ignore. 2276N/A # by default, we also ignore SUNW_* 2276N/A # XXX pkg.sysvpkg adds this, ignoring for now.