#
# 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
#
#
#
import os
import stat
"""Exception that is raised when a file uses a relative path for the
binary with which it should be run."""
return _("{lp} says it should be run with '{bin}' which is "
"""Class representing the dependency created by having #! at the top
of a file."""
"""Given an action, if the file starts with #! a list containing a
ScriptDependency is returned. Further, if the file is of a known type,
it is further analyzed and any dependencies found are added to the list
returned."""
return [], [], {}
f.close()
deps = []
elist = []
pkg_attrs = {}
script_path = None
# add #! dependency
if l.startswith("#!"):
# Determine whether the file will be delivered executable.
if ex_bit:
# first part of string is path (removes options)
# we don't handle dependencies through links, so fix up
# the common one
p = p.strip()
else:
if p.startswith("/bin"):
# Use p[1:] to strip off the leading /.
script_path = l
if "python" in l:
else: