diff -r 0935492f14d7 -r 788328aeec2a tools/python/pkglint/userland.py --- a/tools/python/pkglint/userland.py Fri Mar 22 10:28:14 2013 -0500 +++ b/tools/python/pkglint/userland.py Fri Mar 22 12:37:36 2013 -0700 @@ -21,7 +21,7 @@ # # -# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. # # Some userland consolidation specific lint checks @@ -45,6 +45,24 @@ self.proto_path = path.split() else: self.proto_path = None + # + # These lists are used to check if a 32/64-bit binary + # is in a proper 32/64-bit directory. + # + self.pathlist32 = [ + "i86", + "sparcv7", + "32", + "i86pc-solaris-64int", # perl path + "sun4-solaris-64int" # perl path + ] + self.pathlist64 = [ + "amd64", + "sparcv9", + "64", + "i86pc-solaris-64", # perl path + "sun4-solaris-64" # perl path + ] self.runpath_re = [ re.compile('^/lib(/.*)?$'), re.compile('^/usr/'), @@ -53,7 +71,9 @@ self.runpath_64_re = [ re.compile('^.*/64(/.*)?$'), re.compile('^.*/amd64(/.*)?$'), - re.compile('^.*/sparcv9(/.*)?$') + re.compile('^.*/sparcv9(/.*)?$'), + re.compile('^.*/i86pc-solaris-64(/.*)?$'), # perl path + re.compile('^.*/sun4-solaris-64(/.*)?$') # perl path ] self.initscript_re = re.compile("^etc/(rc.|init)\.d") @@ -250,15 +270,15 @@ type = ei.get("type"); elems = os.path.dirname(path).split("/") - if ("amd64" in elems) or ("sparcv9" in elems) or ("64" in elems): - path64 = True - else: - path64 = False + path64 = False + for p in self.pathlist64: + if (p in elems): + path64 = True - if ("i86" in elems) or ("sparcv7" in elems) or ("32" in elems): - path32 = True - else: - path32 = False + path32 = False + for p in self.pathlist32: + if (p in elems): + path32 = True # ignore 64-bit executables in normal (non-32-bit-specific) # locations, that's ok now.