userland.py revision 168
#
# 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
#
#
#
# Some userland consolidation specific lint checks
import re
"""An opensolaris.org-specific class to check actions."""
name = "userland.action"
self.description = _(
"checks Userland packages for common content errors")
if path != None:
else:
self.proto_path = None
self.runpath_re = [
]
pass
"""Combine path and target to get the real path."""
if frag == '..':
elif frag == '.':
pass
else:
return result
result = None
list = []
continue
break
result = _("bad RUNPATH, '%%s' includes '%s'" %
return result
result = None
else:
result = _("32-bit object '%s' in 64-bit path")
result = _("64-bit object '%s' in 32-bit path")
return result
"""Checks for existence in the proto area."""
return
# check for writable files without a preserve attribute
_("%(path)s is writable (%(mode)s), but missing a preserve"
else:
# checks that require a physical file to look at
if self.proto_path is not None:
break
_("%s missing from proto area, skipping"
" content checks") % path,
# 32/64 bit in wrong place
if result != None:
if result != None:
"""Checks for link resolution."""
return
mpath = None
"hardlink"]:
break
_("%s %s has unresolvable target '%s'") %
"""Checks for SVR4 startup scripts."""
return
_("SVR4 startup '%s', deliver SMF"
" service instead") % path,
init_script.pkglint_desc = _(
"SVR4 startup scripts should not be delivered.")
"""An opensolaris.org-specific class to check manifests."""
name = "userland.manifest"
manifest_paths = []
break
return
return
"license actions are required if you deliver files.")