1231N/A# The contents of this file are subject to the terms of the 1231N/A# Common Development and Distribution License (the "License"). 1231N/A# You may not use this file except in compliance with the License. 1231N/A# See the License for the specific language governing permissions 1231N/A# and limitations under the License. 1231N/A# When distributing Covered Code, include this CDDL HEADER in each 1231N/A# If applicable, add the following below this CDDL HEADER, with the 1231N/A# fields enclosed by brackets "[]" replaced with your own identifying 1231N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3302N/A# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. 1231N/A """Exception that is raised when the elf dependency checker is given 1231N/A a file that errors when it tries to get the dynamic section from the 1231N/A """Exception that is used for elf dependencies which have a dynamic 1231N/A token in their path that we're unable to decode.""" 3158N/A return _(
"{pp} (which will be installed at {ip}) had this " 3158N/A "token, {tok}, in its run path: {rp}. It is not " 1600N/A "currently possible to automatically expand this token. " 1231N/A """Class representing a dependency from one file to another library 1580N/A """Because elf dependencies can be either warnings or errors, 1580N/A it's necessary to check whether this dependency is an error 1231N/A """Checks whether this dependency has been delivered. If the 1231N/A full path has not been delivered, check whether the base name 1231N/A has. If it has, it's likely that the run path is being set 1231N/A externally. Report a warning, but not an error in this case.""" 1231N/A # If the none of the paths pointed to a file with the desired 1231N/A # basename, but a file with that basename was delivered by this 1231N/A # package, then treat the dependency as a warning instead of 1231N/A # an error. The failure to find the path to the right file 1231N/A # may be due to the library search path being set outside the 1231N/A # file that generates the dependency. 1544N/A """Replace dynamic tokens, such as $PLATFORM, in the paths in the 1544N/A paramter 'paths' with the values for that token provided in the 1544N/A # The first dynamic token has been replaced, but 1544N/A # more may remain so process the path again. 1544N/A """Produce the elf dependencies for the file delivered in the action 1544N/A 'action' is the file action to analyze. 1544N/A 'pkg_vars' is the list of variants against which the package delivering 1544N/A 'dyn_tok_conv' is the dictionary which maps the dynamic tokens, like 1544N/A $PLATFORM, to the values they should be expanded to. 2236N/A 'run_paths' contains the run paths which elf binaries should use. 1231N/A # For kernel modules, default path resolution is /platform/<platform>, 1231N/A # a given module? Does it do fallbacks to, say, sun4u? 1231N/A # Add this platform to the search path. 1231N/A # Default kernel search path 1231N/A # What subdirectory should we look in for 64-bit kernel modules? 2236N/A # add our detected runpaths into the user-supplied one (if any) 1544N/A # Find 64-bit modules the way krtld does. 1544N/A # XXX We don't resolve dependencies found in 1544N/A # /platform, since we don't know where under 1544N/A # deppath includes filename; remove that.