[csw-devel] SF.net SVN: gar:[19236] csw/mgar/gar

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Wed Sep 19 22:06:11 CEST 2012


Revision: 19236
          http://gar.svn.sourceforge.net/gar/?rev=19236&view=rev
Author:   chninkel
Date:     2012-09-19 20:06:10 +0000 (Wed, 19 Sep 2012)
Log Message:
-----------
yann's branch

Modified Paths:
--------------
    csw/mgar/gar/v2-yann/lib/python/dependency_checks.py
    csw/mgar/gar/v2-yann/lib/python/inspective_package.py
    csw/mgar/gar/v2-yann/lib/python/inspective_package_test.py
    csw/mgar/gar/v2-yann/lib/python/package.py
    csw/mgar/gar/v2-yann/lib/python/package_checks_test.py
    csw/mgar/gar/v2-yann/lib/python/package_stats.py
    csw/mgar/gar/v2-yann/lib/python/package_stats_test.py
    csw/mgar/gar/v2-yann/lib/python/testdata/apr_util_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/bdb48_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/checkpkg_test_data_CSWdjvulibrert.py
    csw/mgar/gar/v2-yann/lib/python/testdata/ivtools_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/javasvn_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/libnet_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/mercurial_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/neon_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/rsync_pkg_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/sudo_stats.py
    csw/mgar/gar/v2-yann/lib/python/testdata/tree_stats.py

Added Paths:
-----------
    csw/mgar/gar/v2-yann/
    csw/mgar/gar/v2-yann/lib/python/testdata/cadaver_stats.py

Modified: csw/mgar/gar/v2-yann/lib/python/dependency_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/dependency_checks.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/dependency_checks.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -39,6 +39,24 @@
 
 PREFERRED_DIRECTORY_PROVIDERS = set([u"CSWcommon"])
 
+BASE_SOLARIS_LIBRARIES = ( 
+     "libsocket.so.1", "libnsl.so.1", "libdl.so.1", "librt.so.1", "libresolv.so.2", "libpthread.so.1",
+     # linked by default with C++, see "Default C++ Libraries" in Solaris Studio C++ User'sGuide
+     "libCstd.so.1", "libCrun.so.1", "libm.so.1", "libm.so.2", "libw.so.1", "libcx.so.1", "libc.so.1", "libC.so.3", "libC.so.5"
+)
+
+ALLOWED_VERSION_DEPENDENCIES = { "libc.so.1": [ 'SYSVABI_1.3', 'SUNWprivate_1.1', 'SUNW_1.22.6', 'SUNW_1.22.5', 
+                                                'SUNW_1.22.4', 'SUNW_1.22.3', 'SUNW_1.22.2', 'SUNW_1.22.1', 
+                                                'SUNW_1.22', 'SUNW_1.21.3', 'SUNW_1.21.2', 'SUNW_1.21.1', 
+                                                'SUNW_1.21', 'SUNW_1.20.4', 'SUNW_1.20.1', 'SUNW_1.20', 
+                                                'SUNW_1.19', 'SUNW_1.18.1', 'SUNW_1.18', 'SUNW_1.17', 
+                                                'SUNW_1.16', 'SUNW_1.15', 'SUNW_1.14', 'SUNW_1.13', 
+                                                'SUNW_1.12', 'SUNW_1.11', 'SUNW_1.10', 'SUNW_1.9', 
+                                                'SUNW_1.8', 'SUNW_1.7', 'SUNW_1.6', 'SUNW_1.5', 
+                                                'SUNW_1.4', 'SUNW_1.3', 'SUNW_1.2', 'SUNW_1.1', 
+                                                'SUNW_0.9', 'SUNW_0.8', 'SUNW_0.7', 'SISCD_2.3' ] }
+
+
 def ProcessSoname(
     ldd_emulator,
     soname, path_and_pkg_by_basename, binary_info, isalist, binary_path, logger,
@@ -147,6 +165,57 @@
           error_mgr,
           pkgname, messenger)
       orphan_sonames.extend(orphan_sonames_tmp)
+
+
+    ldd_info = pkg_data['ldd_info'][binary_info["path"]]
+    for ldd_response in ldd_info:
+      if ldd_response['state'] == 'soname-unused' and ldd_response['soname'] not in BASE_SOLARIS_LIBRARIES:
+        messenger.Message(
+          "Binary %s links to library %s but doesn't seem to use any of its symbols. "
+          "It usually happens because superfluous libraries were added to the linker options, "
+	  "either because of the configure script itself or because of the \"pkg-config --libs\""
+	  " output of one the dependency."
+          % ("/" + binary_info["path"], ldd_response['soname']))
+        error_mgr.ReportError(
+            pkgname, "soname-unused",
+            "%s is needed by %s but never used" % (ldd_response['soname'], "/" + binary_info["path"]))
+
+    # Even when direct binding is enabled, some symbols might not be
+    # directly bound because the library explicitely requested the symbol
+    # not to be drectly bound to.
+    # For example, libc.so.1 does it for symbol sigaction, free, malloc and realloc
+    # So we consider that direct binding is enabled if at least one symbol is directly
+    # bound to because that definitely means that -B direct or -z direct was used.
+    directly_binded = set()
+    for syminfo in pkg_data["binaries_elf_info"][binary_info["path"]]['symbol table']:
+      if syminfo['external'] and syminfo['flags'] and 'D' in syminfo['flags'] and 'B' in syminfo['flags']:
+          directly_binded.add(syminfo['soname'])
+    not_directly_binded = directly_binded.symmetric_difference(binary_info["needed sonames"])
+
+    if not_directly_binded:
+      messenger.Message(
+	"No symbol of binary %s is directly binded against the following libraries: %s. "
+        "Please make sure the binaries are compiled using the \"-Bdirect\" linker option."
+        % ("/" + binary_info["path"], ", ".join(not_directly_binded)))
+      for soname in not_directly_binded:
+        error_mgr.ReportError(
+          pkgname, "no-direct-binding",
+          "%s is not directly binded to soname %s" % ("/" + binary_info["path"], soname))
+
+
+    for version_dep in pkg_data["binaries_elf_info"][binary_info["path"]]['version needed']:
+      if (version_dep['soname'] in ALLOWED_VERSION_DEPENDENCIES and 
+        not version_dep['version'] in ALLOWED_VERSION_DEPENDENCIES[version_dep['soname']]):
+        messenger.Message(
+          "Binary %s requires interface version %s in library %s which is only available "
+	  "in recent Solaris releases."
+          % ("/" + binary_info["path"], version_dep['version'], version_dep['soname']))
+        error_mgr.ReportError(
+          pkgname, "forbidden-version-interface-dependencies",
+          "%s requires forbidden interface version %s in library %s" 
+	  % ("/" + binary_info["path"], version_dep['version'], version_dep['soname']))
+           
+  
   orphan_sonames = set(orphan_sonames)
   for soname, binary_path in orphan_sonames:
     if soname not in ALLOWED_ORPHAN_SONAMES:

Modified: csw/mgar/gar/v2-yann/lib/python/inspective_package.py
===================================================================
--- csw/mgar/gar/v2/lib/python/inspective_package.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/inspective_package.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -229,17 +229,134 @@
 
     return defined_symbols
 
+
+  def GetBinaryElfInfo(self):
+    """Returns various informations symbol and version present in elf header
+
+    To do this we parse output lines from elfdump -syv, it's the 
+    only command that will give us all informations we need on symbols and versions.
+    We will analyse 3 sections:
+     - version section: contains soname needed, version interface required for each soname, 
+                        and version definition
+     - symbol table section: contains list of symbol and soname/version interface providing it
+                             (the latter is an index in the version section)
+     - syminfo section: contains special linking flags for each symbol
+    """
+    binaries = self.ListBinaries()
+    binaries_elf_info = {}
+
+    for binary in binaries:
+      binary_abspath = os.path.join(self.directory, "root", binary)
+      # elfdump is the only tool that give us all informations
+      args = ["/usr/ccs/bin/elfdump", "-svy", binary_abspath]
+      elfdump_proc = subprocess.Popen(
+          args,
+          stdout=subprocess.PIPE,
+          stderr=subprocess.PIPE)
+      stdout, stderr = elfdump_proc.communicate()
+      retcode = elfdump_proc.wait()
+      if retcode or stderr:
+        logging.error("%s returned one or more errors: %s", args, stderr.splitlines()[0])
+        continue
+      elfdump_out = stdout.splitlines()
+
+      symbols = {}
+      binary_info = { 'version definition': [], 
+		      'version needed': [],
+		      'symbol table': [] }
+      # we will merge syminfo and symbol table information in one list
+      # so the syminfo list is the same as the symbol table one
+      binary_info['syminfo'] = binary_info['symbol table']
+
+      # The list of fields we want to retrieve in the elfdump output by section
+      # if the field is a tuple, it means we will map the original field name
+      # to another name in the final data structure
+      elf_fields = { 'version definition': [ 'version', 'dependency' ],
+                     'version needed': [ ('file', 'soname'), 'version' ],
+		     'symbol table': [ ('name', 'symbol'), ('ver', 'version'), 
+			               'bind', ('shndx', 'external') ],
+		     'syminfo': [ ('library', 'soname'), 'symbol', 'flags' ] }
+
+      cur_section = None
+      for line in elfdump_out:
+        
+        elfdump_data, cur_section = self._ParseElfdumpLine(line, cur_section)
+
+	# header or blank line contains no information
+	if not elfdump_data:
+          continue
+
+        elf_info = {}
+	for field in elf_fields[cur_section]:
+          if type(field) == tuple:
+            elf_info[field[1]] = elfdump_data[field[0]]
+          else:
+            elf_info[field] = elfdump_data[field]
+            
+        # we merge symbol table and syminfo informations so we have to check
+	# if the symbol has not already been added
+	if cur_section in ('symbol table', 'syminfo'):
+          if not elf_info['symbol']:
+            continue
+	  if elf_info['symbol'] in symbols:
+	    symbols[elf_info['symbol']].update(elf_info)
+	    continue 
+          else:
+	    symbols[elf_info['symbol']] = elf_info
+            
+        binary_info[cur_section].append(elf_info)
+
+      # elfdump doesn't repeat the name of the soname in the version section
+      # if it's the same on two contiguous line, so we have to make sure
+      # the information is present in each entry
+      for i, version in enumerate(binary_info['version needed'][1:]):
+        if not version['soname']:
+          version['soname'] = binary_info['version needed'][i]['soname']
+
+      # if it exists, the first "version definition" entry is the base soname 
+      # we don't need this information
+      if binary_info['version definition']:
+	binary_info['version definition'].pop(0)
+
+      # To not rely of the section order output of elfdump, we resolve symbol version
+      # informations here after having parsed all elfdump output
+      nb_versions_definition = len(binary_info['version definition'])
+      for sym_info in binary_info['symbol table']:
+        version_index = int(sym_info['version']) - 2
+	if version_index > 1:
+	  if version_index < nb_versions_definition:
+	    version = binary_info['version definition'][version_index]
+          else:
+	    version = binary_info['version needed'][version_index - nb_versions_definition]
+          sym_info['version'] = version['version']
+	  sym_info['soname'] = version['soname']
+        else:
+          sym_info['version'] = None
+
+        if sym_info['external'] == 'UNDEF':
+          sym_info['external'] = True
+        else:
+          sym_info['external'] = False
+
+        # we make sure the field are present even if the syminfo section is not
+        sym_info.setdefault('soname')
+        sym_info.setdefault('flags')
+
+      binaries_elf_info[binary] = binary_info
+
+    return binaries_elf_info
+
+
   def GetLddMinusRlines(self):
     """Returns ldd -r output."""
-    dir_pkg = self.GetInspectivePkg()
-    binaries = dir_pkg.ListBinaries()
+    binaries = self.ListBinaries()
     ldd_output = {}
     for binary in binaries:
-      binary_abspath = os.path.join(dir_pkg.directory, "root", binary)
+      binary_abspath = os.path.join(self.directory, "root", binary)
       # this could be potentially moved into the DirectoryFormatPackage class.
       # ldd needs the binary to be executable
       os.chmod(binary_abspath, 0755)
-      args = ["ldd", "-r", binary_abspath]
+      args = ["ldd", "-Ur", binary_abspath]
       ldd_proc = subprocess.Popen(
           args,
           stdout=subprocess.PIPE,
@@ -247,10 +364,22 @@
       stdout, stderr = ldd_proc.communicate()
       retcode = ldd_proc.wait()
       if retcode:
-        logging.error("%s returned an error: %s", args, stderr)
+        uname_info = os.uname()
+	if (uname_info[2] == '5.9' and uname_info[4] == 'i86pc' and
+	    '/amd64/' in binary_abspath and 'has wrong class or data encoding' in stderr):
+          # we are trying to analyze a 64 bits binary on a Solaris 9 x86
+	  # which exists only in 32 bits, that's not possible 
+	  # we ignore the error and return no information as it is likely
+	  # that the ldd infos will be the same on the 32 bits binaries analyzed
+	  return {}
+        else:
+          logging.error("%s returned an error: %s", args, stderr)
+
       ldd_info = []
       for line in stdout.splitlines():
-        ldd_info.append(self._ParseLddDashRline(line))
+	result = self._ParseLddDashRline(line, binary_abspath)  
+	if result:
+          ldd_info.append(result)
       ldd_output[binary] = ldd_info
     return ldd_output
 
@@ -263,7 +392,38 @@
     sym = { 'address': fields[0], 'type': fields[1], 'name': fields[2] }
     return sym
 
-  def _ParseLddDashRline(self, line):
+
+  def _ParseElfdumpLine(self, line, section = None):
+
+    headers_re = (r'(?P<section>Version Needed|Version Definition|Symbol Table|Syminfo) Section:\s+(?:\.SUNW_version|\.dynsym|\.SUNW_syminfo|.symtab)\s*$|'
+                   '\s*(?:index\s+)?version\s+dependency\s*$|'
+                   '\s*(?:index\s+)?file\s+version\s*$|'
+                   '\s*index\s*value\s+size\s+type\s+bind\s+oth\s+ver\s+shndx\s+name\s*$|'
+                   '\s*index\s+flags\s+bound to\s+symbol\s*$|'
+		   '\s*$')
+
+    re_by_section = { 'version definition': (r'\s*(?:\[(?P<index>\d+)\]\s+)?(?P<version>.*\S)\s+(?P<dependency>\S+)?\s*$'),
+		      'version needed': (r'\s*(?:\[(?P<index>\d+)\]\s+)?(?:(?P<file>\S+)\s+(?!\[ (?:INFO|WEAK) \]))?(?P<version>\S+)(?:\s+\[ (?:INFO|WEAK) \])?\s*$'),
+		      'symbol table': (r'\s*\[\d+\]\s+(?:0x[0-9a-f]+|REG_G\d+)\s+0x[0-9a-f]+\s+\S+\s+(?P<bind>\S+)\s+\S+\s+(?P<ver>\S+)\s+(?P<shndx>\S+)\s+(?P<name>\S+)?\s*$'),
+		      'syminfo': (r'\s*\[\d+\]\s+(?P<flags>[ABCDFILNPS]+)\s+(?:(?:\[\d+\]\s+(?P<library>.*\S)|<self>)\s+)?(?P<symbol>.*\S)\s*') }
+
+    elfdump_data = None
+    m = re.match(headers_re, line)
+    if m:
+      if m.lastindex:
+        section = m.group('section').lower()
+    elif section:
+      m = re.match(re_by_section[section], line)
+      if m:
+        elfdump_data = m.groupdict()
+
+    if not m:
+      raise package.StdoutSyntaxError("Could not parse %s" % (repr(line)))
+
+    return elfdump_data, section
+
+
+  def _ParseLddDashRline(self, line, binary=None):
     found_re = r"^\t(?P<soname>\S+)\s+=>\s+(?P<path_found>\S+)"
     symbol_not_found_re = (r"^\tsymbol not found:\s(?P<symbol>\S+)\s+"
                            r"\((?P<path_not_found>\S+)\)")
@@ -280,12 +440,17 @@
                   r'file (?P<sizediff_file2>\S+) size=(?P<size2>0x\w+)\)$')
     sizes_one_used = (r'^\t\t(?P<sizediffused_file>\S+) size used; '
                       r'possible insufficient data copied$')
-    common_re = (r"(%s|%s|%s|%s|%s|%s|%s|%s)"
-                 % (found_re, symbol_not_found_re, only_so, version_so,
-                    stv_protected, sizes_differ, sizes_info, sizes_one_used))
+    unreferenced_object = (r'^\s*unreferenced object=(?P<object>.*); unused dependency of (?P<binary>.*)$')
+    unused_object = (r'^\s*unused object=.*$')
+    unused_search_path = (r'^\s*unused search path=.*  \(RUNPATH/RPATH from file .*\)$')
+    blank_line = (r'^\s*$')
+    common_re = (r"(%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s)"
+                 % (found_re, symbol_not_found_re, only_so, version_so, stv_protected, sizes_differ, sizes_info,
+		    sizes_one_used, unreferenced_object, unused_object, unused_search_path, blank_line))
     m = re.match(common_re, line)
-    response = {}
+    response = None
     if m:
+      response = {}
       d = m.groupdict()
       if "soname" in d and d["soname"]:
         # it was found
@@ -298,6 +463,11 @@
         response["soname"] = None
         response["path"] = d["path_not_found"]
         response["symbol"] = d["symbol"]
+      elif "binary" in d and d["binary"] and binary == d["binary"]:
+        response["state"] = "soname-unused"
+        response["soname"] = os.path.basename(d["object"])
+        response["path"] = None
+        response["symbol"] = None
       elif d["path_only"]:
         response["state"] = "OK"
         response["soname"] = None
@@ -328,12 +498,11 @@
         response["soname"] = None
         response["path"] = "%s" % (d["sizediffused_file"])
         response["symbol"] = None
-      else:
-        raise StdoutSyntaxError("Could not parse %s with %s"
-                                % (repr(line), common_re))
+
     else:
-      raise StdoutSyntaxError("Could not parse %s with %s"
-                              % (repr(line), common_re))
+      raise package.StdoutSyntaxError("Could not parse %s with %s"
+                                      % (repr(line), common_re))
+
     return response
 
   def GetDependencies(self):

Modified: csw/mgar/gar/v2-yann/lib/python/inspective_package_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/inspective_package_test.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/inspective_package_test.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -74,6 +74,47 @@
   def setUp(self):
     self.ip = inspective_package.InspectivePackage("/fake/path/CSWfoo")
 
+  def test_ParseElfdumpLineSectionHeader(self):
+    line = 'Symbol Table Section:  .dynsym'
+    self.assertEqual((None, "symbol table"), self.ip._ParseElfdumpLine(line, None))
+
+  def test_ParseElfdumpLineVersionNeeded(self):
+    line = '[13]                              SUNW_0.9             [ INFO ]'
+    expected = { 
+        'index': '13',
+	'version': 'SUNW_0.9',
+	'file': None
+    }
+    self.assertEqual((expected, "version needed"), self.ip._ParseElfdumpLine(line, 'version needed'))
+
+  def test_ParseElfdumpLineSymbolTable(self):
+    line = '    [9]  0x000224b8 0x0000001c  FUNC GLOB  D    1 .text          vsf_log_line'
+    expected = { 
+        'bind': 'GLOB',
+	'shndx': '.text',
+	'name': 'vsf_log_line',
+	'ver': '1'
+    }
+    self.assertEqual((expected, 'symbol table'), self.ip._ParseElfdumpLine(line, 'symbol table'))
+
+  def test_ParseElfdumpLineNeededSymbol(self):
+    line = '      [152]  DB           [4] libc.so.1                strlen'
+    expected = {
+        'flags': 'DB',
+        'library': 'libc.so.1',
+        'symbol': 'strlen',
+    }
+    self.assertEqual((expected, "syminfo"), self.ip._ParseElfdumpLine(line, "syminfo"))
+
+  def test_ParseElfdumpLineExportedSymbol(self):
+    line = '      [116]  DB               <self>                   environ'
+    expected = {
+        'flags': 'DB',
+        'library': None,
+        'symbol': 'environ',
+    }
+    self.assertEqual((expected, "syminfo"), self.ip._ParseElfdumpLine(line, "syminfo"))
+
   def test_ParseNmSymLineGoodLine(self):
     line = '0000097616 T aliases_lookup'
     expected = {

Modified: csw/mgar/gar/v2-yann/lib/python/package.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/package.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -42,6 +42,8 @@
 class PackageError(Error):
   pass
 
+class StdoutSyntaxError(Error):
+  pass
 
 class CswSrv4File(shell.ShellMixin, object):
   """Represents a package in the srv4 format (pkg)."""

Modified: csw/mgar/gar/v2-yann/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/package_checks_test.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -25,6 +25,8 @@
 from testdata.neon_stats import pkgstats as neon_stats
 from testdata.bdb48_stats import pkgstat_objs as bdb48_stats
 from testdata.mercurial_stats import pkgstat_objs as mercurial_stats
+from testdata.cadaver_stats import pkgstats as cadaver_stats
+from testdata.vsftpd_stats import pkgstats as vsftpd_stats
 from testdata import stubs
 
 DEFAULT_PKG_STATS = None
@@ -498,6 +500,13 @@
     binaries_dump_info[0]["needed sonames"] = ["libdb-4.7.so"]
     self.pkg_data["depends"] = (("CSWfoo", None),(u"CSWcommon", ""))
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["binaries_elf_info"]['opt/csw/bin/sparcv8/rsync'] = {
+	'version definition': [],
+	'version needed': [],
+	'symbol table': [
+		{ 'soname': 'libdb-4.7.so', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+		]
+    }
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libdb-4.7.so').AndReturn({
        u'/opt/csw/lib': [u'CSWfoo'],
        u'/opt/csw/lib/sparcv9': [u'CSWfoo'],
@@ -526,6 +535,13 @@
     binaries_dump_info[0]["needed sonames"] = ["libdb-4.7.so"]
     self.pkg_data["depends"] = (("CSWbad", None),(u"CSWcommon", ""))
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["binaries_elf_info"]['opt/csw/bin/sparcv8/rsync'] = {
+	'version definition': [],
+	'version needed': [],
+	'symbol table': [
+		{ 'soname': 'libdb-4.7.so', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+	]
+    }
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libdb-4.7.so').AndReturn({
        u'/opt/csw/bdb47/lib':         [u'CSWbad'],
        u'/opt/csw/bdb47lib/sparcv9': [u'CSWbad'],
@@ -554,6 +570,15 @@
     binaries_dump_info[0]["needed sonames"] = ["libdb-4.7.so"]
     self.pkg_data["depends"] = (("CSWbad", None),(u"CSWcommon", ""))
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["binaries_elf_info"]['opt/csw/bin/sparcv8/rsync'] = {
+        'version definition': [],
+	'version needed': [],
+	'symbol table': [{ 'symbol': 'foo', 
+		           'soname': 'libdb-4.7.so', 
+			   'bind': 'GLOB',
+			   'external': True, 
+			   'flags': 'DBL' }],
+    }
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libdb-4.7.so').AndReturn({
        u'/opt/csw/bdb47/lib':         [u'CSWbad'],
        u'/opt/csw/bdb47lib/sparcv9': [u'CSWbad'],
@@ -591,6 +616,15 @@
     binaries_dump_info[0]["needed sonames"] = ["libm.so.2"]
     self.pkg_data["depends"] = ((u"CSWcommon", ""),)
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["binaries_elf_info"] = { 
+	'opt/csw/bin/sparcv8/rsync': { 
+		'version definition': [],
+		'version needed': [],
+		'symbol table': [
+			{ 'soname': 'libm.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+			]
+		}
+	}
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libm.so.2').AndReturn({
     })
     self.error_mgr_mock.GetPkgByPath(
@@ -634,6 +668,15 @@
                                 }],
         'depends': (('CSWlibfoo', None),),
         'isalist': (),
+	'ldd_info': { 'opt/csw/bin/bar': [] },
+	'binaries_elf_info': { 'opt/csw/bin/bar': { 
+		 		'version definition': [],
+				'version needed': [],
+				'symbol table': [
+					{ 'soname': 'libfoo.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+					]
+				}
+			},
         'pkgmap': [],
         'files_metadata': [
                     {'endian': 'Little endian',
@@ -650,6 +693,7 @@
         'binaries_dump_info': [],
         'depends': [],
         'isalist': (),
+	'ldd_info': {},
         'pkgmap': [],
       }
 
@@ -687,6 +731,20 @@
         # 'depends': (),
         'depends': ((u"CSWcommon", ""),),
         'isalist': ('foo'),
+	'ldd_info': { 'opt/csw/bin/bar': [], 'opt/csw/lib/libfoo.so.1': []},
+	'binaries_elf_info': { 'opt/csw/bin/bar': { 
+		 		'version definition': [],
+				'version needed': [],
+				'symbol table': [
+					{ 'soname': 'libfoo.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+					]
+				},
+		            'opt/csw/lib/libfoo.so.1': {
+			     		'version definition': [],
+					'version needed': [],
+					'symbol table': [],
+					}
+			    },
         'pkgmap': [
           { 'path': '/opt/csw/lib/libfoo.so.1', },
           { 'path': '/opt/csw/bin/bar', },
@@ -712,6 +770,16 @@
     binaries_dump_info[0]["path"] = 'opt/csw/lib/python/site-packages/foo.so'
     self.pkg_data["depends"] = ((u"CSWcommon", "This one provides directories"),)
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["ldd_info"] = { 'opt/csw/lib/python/site-packages/foo.so': [] }
+    self.pkg_data["binaries_elf_info"] = { 
+	'opt/csw/lib/python/site-packages/foo.so': { 
+		'version definition': [],
+		'version needed': [],
+		'symbol table': [
+			{ 'soname': 'libbar.so', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+			]
+		}
+	}
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libbar.so').AndReturn({
        u'/opt/csw/lib': [u'CSWlibbar'],
        u'/opt/csw/lib/sparcv9': [u'CSWlibbar'],
@@ -738,6 +806,16 @@
     binaries_dump_info[0]["path"] = 'opt/csw/lib/foo.so'
     self.pkg_data["depends"] = ((u"CSWcommon","This is needed"),)
     self.pkg_data["binaries_dump_info"] = binaries_dump_info[0:1]
+    self.pkg_data["ldd_info"] = { 'opt/csw/lib/foo.so': [] }
+    self.pkg_data["binaries_elf_info"] = { 
+	'opt/csw/lib/foo.so': { 
+		'version definition': [],
+		'version needed': [],
+		'symbol table': [
+			{ 'soname': 'libnotfound.so', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+			]
+		}
+	}
     self.error_mgr_mock.GetPathsAndPkgnamesByBasename(
         'libnotfound.so').AndReturn({})
     self.error_mgr_mock.GetPkgByPath(
@@ -1332,8 +1410,175 @@
     for i in range(27):
       self.error_mgr_mock.NeedFile(
           mox.IsA(str), mox.IsA(unicode), mox.IsA(str))
+   
+class TestCheckUnusedSoname(CheckTestHelper, unittest.TestCase):
+  FUNCTION_NAME = 'SetCheckLibraries'
+  def testUnusedSoname(self):
+    self.pkg_data = cadaver_stats
 
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libc.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libcrypto.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libcurses.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libdl.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libexpat.so.1').AndReturn({
+      "/opt/csw/lib": [u'CSWexpat'], u'/opt/csw/lib/sparcv9': [u'CSWexpat']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libiconv.so.2').AndReturn({
+      "/opt/csw/lib": [u'CSWlibiconv2'], u'/opt/csw/lib/sparcv9': [u'CSWlibiconv2']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libintl.so.8').AndReturn({
+      "/opt/csw/lib": (u"CSWggettextrt",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libm.so.2').AndReturn(
+      {'/lib': [u'SUNWlibmsr'],
+       '/lib/sparcv9': [u'SUNWlibmsr'],
+       '/usr/lib': [u'SUNWlibms'],
+       '/usr/lib/sparcv9': [u'SUNWlibms']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libmd.so.1').AndReturn(
+      {'/lib': [u'SUNWclsr'],
+       '/lib/sparcv9': [u'SUNWclsr'],
+       '/usr/lib': [u'SUNWcls'],
+       '/usr/lib/sparcv9': [u'SUNWcls']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libmp.so.2').AndReturn(
+      {'/lib': [u'SUNWclsr'],
+       '/lib/sparcv9': [u'SUNWclsr'],
+       '/usr/lib': [u'SUNWcls'],
+       '/usr/lib/sparcv9': [u'SUNWcls']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libncurses.so.5').AndReturn({
+      "/opt/csw/lib": [u'CSWlibncurses5'], u'/opt/csw/lib/sparcv9': [u'CSWlibncurses5']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libneon.so.27').AndReturn({
+      "/opt/csw/lib": [u'CSWlibneon27'], u'/opt/csw/lib/sparcv9': [u'CSWlibneon27']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libnsl.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libreadline.so.6').AndReturn({
+      "/opt/csw/lib": [u'CSWlibreadline6'], u'/opt/csw/lib/sparcv9': [u'CSWlibreadline6']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libsocket.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libssl.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libz.so.1').AndReturn({
+      "/opt/csw/lib": (u"CSWlibz1",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibz1",),
+      "/usr/lib": (u"SUNWzlib")})
 
+
+    for common_path in ["/opt/csw/share/locale/it/LC_MESSAGES", "/opt/csw/bin",
+		        "/opt/csw/share/locale/en at quot/LC_MESSAGES", "/opt/csw/share/man",
+			"/opt/csw/share/doc", "/opt/csw/share/locale/es/LC_MESSAGES"]:
+      self.error_mgr_mock.GetPkgByPath(common_path).AndReturn([u"CSWcommon"])
+
+    for i in range(21):
+      self.error_mgr_mock.NeedFile(
+          mox.IsA(str), mox.IsA(str), mox.IsA(str))
+
+    for soname in [ 'libcurses.so.1', 'libz.so.1', 'libssl.so.1.0.0',
+		    'libcrypto.so.1.0.0', 'libexpat.so.1' ]:
+      self.error_mgr_mock.ReportError(
+        'CSWcadaver', 'soname-unused', 
+        soname + ' is needed by /opt/csw/bin/cadaver but never used')
+
+class TestCheckDirectBinding(CheckTestHelper, unittest.TestCase):
+  FUNCTION_NAME = 'SetCheckLibraries'
+  def testDirectBinding(self):
+    self.pkg_data = vsftpd_stats
+
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libc.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libcrypto.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libnsl.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libpam.so.1').AndReturn({
+      "/usr/dt/lib": (u"SUNWdtbas",),
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),
+    })
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('librt.so.1').AndReturn({
+      '/usr/lib': [u'SUNWcsl'], 
+      '/usr/lib/sparcv9': [u'SUNWcslx']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libsendfile.so.1').AndReturn({
+      '/usr/lib': [u'SUNWcsl'],
+      '/usr/lib/sparcv9': [u'SUNWcslx']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libsocket.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libssl.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+
+    for common_path in ["/opt/csw/share/man", "/var/opt/csw", "/opt/csw/sbin",
+		        "/opt/csw/share/doc", "/etc/opt/csw"]:
+      self.error_mgr_mock.GetPkgByPath(common_path).AndReturn([u"CSWcommon"])
+
+    for soname in [ 'libnsl.so.1', 'libpam.so.1', 'libsocket.so.1', 'librt.so.1', 
+		    'libsendfile.so.1', 'libssl.so.1.0.0', 'libcrypto.so.1.0.0', 
+		    'libc.so.1' ]:
+      self.error_mgr_mock.NeedFile(
+          mox.IsA(str), mox.IsA(str), mox.IsA(str))
+
+    self.error_mgr_mock.ReportError(
+	'CSWvsftpd',
+	'no-direct-binding',
+	'/opt/csw/sbin/vsftpd is not directly binded to soname ' + soname)
+
+  def testDirectBindingNoSyminfo(self):
+    self.pkg_data = vsftpd_stats
+    self.pkg_data[0]['binaries_elf_info']['opt/csw/sbin/vsftpd'] = {
+     		'version definition': [],
+		'version needed': [],
+		'symbol table': [] }
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libc.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libcrypto.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libnsl.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libpam.so.1').AndReturn({
+      "/usr/dt/lib": (u"SUNWdtbas",),
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),
+    })
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('librt.so.1').AndReturn({
+      '/usr/lib': [u'SUNWcsl'], 
+      '/usr/lib/sparcv9': [u'SUNWcslx']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libsendfile.so.1').AndReturn({
+      '/usr/lib': [u'SUNWcsl'],
+      '/usr/lib/sparcv9': [u'SUNWcslx']})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libsocket.so.1').AndReturn({
+      "/usr/lib": (u"SUNWcsl",),
+      "/usr/lib/sparcv9": (u"SUNWcslx"),})
+    self.error_mgr_mock.GetPathsAndPkgnamesByBasename('libssl.so.1.0.0').AndReturn({
+      "/opt/csw/lib": (u"CSWlibssl1-0-0",), 
+      "/opt/csw/lib/sparcv9": (u"CSWlibssl1-0-0",)})
+
+    for common_path in ["/opt/csw/share/man", "/var/opt/csw", "/opt/csw/sbin",
+		        "/opt/csw/share/doc", "/etc/opt/csw"]:
+      self.error_mgr_mock.GetPkgByPath(common_path).AndReturn([u"CSWcommon"])
+
+    for soname in [ 'libnsl.so.1', 'libpam.so.1', 'libsocket.so.1', 'librt.so.1', 
+		    'libsendfile.so.1', 'libssl.so.1.0.0', 'libcrypto.so.1.0.0', 
+		    'libc.so.1' ]:
+      self.error_mgr_mock.NeedFile(
+          mox.IsA(str), mox.IsA(str), mox.IsA(str))
+
+    for soname in [ 'libpam.so.1', 'libnsl.so.1', 'libcrypto.so.1.0.0', 
+		    'librt.so.1', 'libsendfile.so.1', 'libssl.so.1.0.0',
+		    'libsocket.so.1', 'libc.so.1' ]:
+      self.error_mgr_mock.ReportError(
+        'CSWvsftpd',
+        'no-direct-binding',
+        '/opt/csw/sbin/vsftpd is not directly binded to soname ' + soname)
+
+
 class TestCheckWrongArchitecture(CheckTestHelper, unittest.TestCase):
   FUNCTION_NAME = 'CheckWrongArchitecture'
   def testSparcBinariesInIntelPackage(self):

Modified: csw/mgar/gar/v2-yann/lib/python/package_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/package_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -208,6 +208,8 @@
         "basic_stats": basic_stats,
         "files_metadata": dir_pkg.GetFilesMetadata(),
         "mtime": self.GetMtime(),
+	"ldd_info": dir_pkg.GetLddMinusRlines(),
+	"binaries_elf_info": dir_pkg.GetBinaryElfInfo(),
     }
     self.SaveStats(pkg_stats)
     logging.debug("Statistics of %s have been collected.", repr(dir_pkg.pkgname))

Modified: csw/mgar/gar/v2-yann/lib/python/package_stats_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats_test.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/package_stats_test.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -60,6 +60,8 @@
     mock_dirpkg.GetFilesContaining(mox.IsA(tuple)).AndReturn([])
     mock_dirpkg.GetFilesMetadata().AndReturn([])
     mock_srv4.GetMtime().AndReturn(datetime.datetime(2010, 12, 8, 7, 52, 54))
+    mock_dirpkg.GetLddMinusRlines().AndReturn({})
+    mock_dirpkg.GetBinaryElfInfo().AndReturn({})
     pkgstats = package_stats.PackageStats(mock_srv4)
     self.mox.ReplayAll()
     data_structure = pkgstats._CollectStats(True)

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/apr_util_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/apr_util_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/apr_util_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -207,6 +207,40 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {'opt/csw/lib/apr-util-1/apr_dbd_odbc-1.so': [],
+	       'opt/csw/lib/apr-util-1/apr_dbd_sqlite3-1.so': [],
+	       'opt/csw/lib/apr-util-1/apr_dbm_db-1.so': [],
+	       'opt/csw/lib/apr-util-1/apr_ldap-1.so': [],
+	       'opt/csw/lib/libaprutil-1.so.0.3.9': []},
+  'binaries_elf_info': {'opt/csw/lib/apr-util-1/apr_dbd_odbc-1.so': {
+		   		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	             'opt/csw/lib/apr-util-1/apr_dbd_sqlite3-1.so': {
+		      		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	             'opt/csw/lib/apr-util-1/apr_dbm_db-1.so': {
+		      		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	             'opt/csw/lib/apr-util-1/apr_ldap-1.so': {
+		      		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	             'opt/csw/lib/libaprutil-1.so.0.3.9': {
+				 		'version definition': [],
+						'version needed': [],
+						'symbol table': [] },
+		     },
+  'binaries_dump_info': [{'RPATH set': True,
+                          'RUNPATH RPATH the same': True,
+                          'RUNPATH set': True,
+                          'base_name': 'apr_dbd_odbc-1.so',
+                          'needed sonames': ('libodbc.so.1', 'libc.so.1'),
+                          'path': 'opt/csw/lib/apr-util-1/apr_dbd_odbc-1.so',
+                          'runpath': ('/opt/csw/bdb47/lib', '/opt/csw/lib'),
+                          'soname': 'apr_dbd_odbc-1.so'},
   'mtime': datetime.datetime(2010, 8, 27, 11, 0, 10),
   'overrides': [],
   'pkgchk': {'return_code': 0,

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/bdb48_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/bdb48_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/bdb48_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -745,6 +745,68 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {'opt/csw/bdb48/bin/db_archive': [],
+	       'opt/csw/bdb48/bin/db_checkpoint': [],
+	       'opt/csw/bdb48/bin/db_deadlock': [],
+	       'opt/csw/bdb48/bin/db_dump': [],
+	       'opt/csw/bdb48/bin/db_hotbackup': [],
+	       'opt/csw/bdb48/bin/db_load': [],
+	       'opt/csw/bdb48/bin/db_printlog': [],
+	       'opt/csw/bdb48/bin/db_recover': [],
+	       'opt/csw/bdb48/bin/db_sql': [],
+	       'opt/csw/bdb48/bin/db_stat': [],
+	       'opt/csw/bdb48/bin/db_upgrade': [],
+	       'opt/csw/bdb48/bin/db_verify': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_archive': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_checkpoint': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_deadlock': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_dump': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_hotbackup': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_load': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_printlog': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_recover': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_sql': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_stat': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_upgrade': [],
+	       'opt/csw/bdb48/bin/sparcv9/db_verify': [],
+	       'opt/csw/bdb48/lib/libdb-4.8.so': [],
+	       'opt/csw/bdb48/lib/libdb_cxx-4.8.so': [],
+	       'opt/csw/bdb48/lib/libdb_java-4.8.so': [],
+	       'opt/csw/bdb48/lib/libdb_tcl-4.8.so': [],
+	       'opt/csw/bdb48/lib/sparcv9/libdb-4.8.so': [],
+	       'opt/csw/bdb48/lib/sparcv9/libdb_cxx-4.8.so': [],
+	       'opt/csw/bdb48/lib/sparcv9/libdb_java-4.8.so': []},
+  'ldd_info': {'opt/csw/bdb48/bin/db_archive': {},
+	       'opt/csw/bdb48/bin/db_checkpoint': {},
+	       'opt/csw/bdb48/bin/db_deadlock': {},
+	       'opt/csw/bdb48/bin/db_dump': {},
+	       'opt/csw/bdb48/bin/db_hotbackup': {},
+	       'opt/csw/bdb48/bin/db_load': {},
+	       'opt/csw/bdb48/bin/db_printlog': {},
+	       'opt/csw/bdb48/bin/db_recover': {},
+	       'opt/csw/bdb48/bin/db_sql': {},
+	       'opt/csw/bdb48/bin/db_stat': {},
+	       'opt/csw/bdb48/bin/db_upgrade': {},
+	       'opt/csw/bdb48/bin/db_verify': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_archive': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_checkpoint': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_deadlock': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_dump': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_hotbackup': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_load': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_printlog': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_recover': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_sql': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_stat': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_upgrade': {},
+	       'opt/csw/bdb48/bin/sparcv9/db_verify': {},
+	       'opt/csw/bdb48/lib/libdb-4.8.so': {},
+	       'opt/csw/bdb48/lib/libdb_cxx-4.8.so': {},
+	       'opt/csw/bdb48/lib/libdb_java-4.8.so': {},
+	       'opt/csw/bdb48/lib/libdb_tcl-4.8.so': {},
+	       'opt/csw/bdb48/lib/sparcv9/libdb-4.8.so': {},
+	       'opt/csw/bdb48/lib/sparcv9/libdb_cxx-4.8.so': {},
+	       'opt/csw/bdb48/lib/sparcv9/libdb_java-4.8.so': {}},
   'mtime': datetime.datetime(2010, 3, 2, 18, 9, 30),
   'overrides': [],
   'pkgchk': {'return_code': 0,

Added: csw/mgar/gar/v2-yann/lib/python/testdata/cadaver_stats.py
===================================================================
--- csw/mgar/gar/v2-yann/lib/python/testdata/cadaver_stats.py	                        (rev 0)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/cadaver_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -0,0 +1,208 @@
+import datetime
+pkgstats = [{'bad_paths': {},
+  'basic_stats': {'catalogname': 'cadaver',
+                  'md5_sum': 'd74a2f65ef0caff0bdde7310007764a8',
+                  'parsed_basename': {'arch': 'i386',
+                                      'catalogname': 'cadaver',
+                                      'full_version_string': '0.23.3,REV=2012.06.06',
+                                      'osrel': 'SunOS5.10',
+                                      'revision_info': {'REV': '2012.06.06'},
+                                      'vendortag': 'CSW',
+                                      'version': '0.23.3',
+                                      'version_info': {'major version': '0',
+                                                       'minor version': '23',
+                                                       'patchlevel': '3'}},
+                  'pkg_basename': 'neon-0.29.0,REV=2009.09.14-SunOS5.8-i386-CSW.pkg.gz',
+                  'pkg_path': '/tmp/pkg_3Wy60k/cadaver-0.23.3,REV=2012.06.06-i386-CSW.pkg.gz',
+                  'pkgname': 'CSWcadaver',
+                  'size': 215040L,
+                  'stats_version': 10L},
+  'binaries': ['opt/csw/bin/cadaver'],
+  'binaries_dump_info': [{'RPATH set': True,
+                          'RUNPATH RPATH the same': True,
+                          'RUNPATH set': True,
+                          'base_name': 'cadaver',
+                          'needed sonames': ('libreadline.so.6',
+                                             'libcurses.so.1',
+                                             'libintl.so.8',
+                                             'libneon.so.27',
+                                             'libnsl.so.1',
+                                             'libsocket.so.1',
+                                             'libz.so.1',
+                                             'libssl.so.1.0.0',
+                                             'libcrypto.so.1.0.0',
+                                             'libdl.so.1',
+                                             'libexpat.so.1',
+                                             'libc.so.1',
+                                             'libncurses.so.5',
+                                             'libiconv.so.2',
+                                             'libmp.so.2',
+                                             'libmd.so.1',
+                                             'libm.so.2'),
+                          'path': 'opt/csw/bin/cadaver',
+                          'runpath': ('/opt/csw/lib/$ISALIST',
+                                      '/opt/csw/lib',
+                                      '/opt/csw/lib',
+                                      '/opt/csw/lib/'),
+                          'soname': None}],
+  'depends': [('CSWcommon', 
+               'CSWcommon common - common files and dirs for CSW packages'),
+              ('CSWlibssl1-0-0',
+               'libssl1_0_0 - Openssl 1.0 runtime libraries'),
+              ('CSWlibintl8',
+               'libintl8 - GNU locale utilities, libintl.so.8'),
+              ('CSWlibneon27',
+               'libneon27 - Neon HTTP and WebDAV client library, libneon.so.27'),
+              ('CSWlibreadline6',
+               'libreadline6 - GNU readline library, libreadline.so.6'),
+              ('CSWlibexpat1',
+               'libexpat1 - XML parser toolkit, libexpat.so.1'),
+              ('CSWlibz1',
+               'libz1 - Zlib data compression library, libz.so.1')],
+  'isalist': frozenset(['amd64',
+                        'i386',
+                        'i486',
+                        'i86',
+                        'pentium',
+                        'pentium+mmx',
+                        'pentium_pro',
+                        'pentium_pro+mmx']),
+  'ldd_info': {'opt/csw/bin/cadaver': [ { 'soname': 'libcurses.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libnsl.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libsocket.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libz.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libssl.so.1.0.0', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libcrypto.so.1.0.0', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libdl.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None },
+	                                { 'soname': 'libexpat.so.1', 'state': 'soname-unused', 'path': None, 'symbol': None } ]},
+  'binaries_elf_info': {'opt/csw/bin/cadaver': { 
+	   		'version definition': [],
+			'version needed': [],
+			'symbol table': [
+				{ 'soname':       'libcurses.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libz.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libssl.so.1.0.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libcrypto.so.1.0.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libdl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libreadline.so.6', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libintl.so.8', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libneon.so.27', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libncurses.so.5', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libiconv.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libmp.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libmd.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libm.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libexpat.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' }
+				]}},
+  'mtime': datetime.datetime(2012, 6, 6, 20, 21, 14),
+  'overrides': [],
+  'pkgmap': [{'class': None,
+              'group': None,
+              'line': ': 1 458',
+              'mode': None,
+              'path': None,
+              'target': None,
+              'type': '1',
+              'user': None},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/bin/cadaver',
+              'mode': '0755',
+              'user': 'root',
+              'group': 'bin', 
+              'line': '1 f none /opt/csw/bin/cadaver 0755 root bin 127432 5422 1339017365'},
+             {'type': 'd',
+              'class': None,
+              'path': '/opt/csw/share/doc/cadaver',
+              'mode': '0755',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 d none /opt/csw/share/doc/cadaver 0755 root bin'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/doc/cadaver/changelog.CSW',
+              'mode': '0755',
+              'user': 'root',
+              'group':  'bin 1791 7810 1339017366',
+              'line': '1 f none /opt/csw/share/doc/cadaver/changelog.CSW 0755 root bin 1791 7810 1339017366'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/doc/cadaver/license',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/doc/cadaver/license 0644 root bin 17982 28433 1339017365'},
+             {'type': 'd',
+              'class': None,
+              'path': '/opt/csw/share/doc/cadaver_stub',
+              'mode': '0755',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 d none /opt/csw/share/doc/cadaver_stub 0755 root bin'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/doc/cadaver_stub/changelog.CSW',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/doc/cadaver_stub/changelog.CSW 0644 root bin 1791 7810 1339017366'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/locale/en at quot/LC_MESSAGES/cadaver.mo',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/locale/en at quot/LC_MESSAGES/cadaver.mo 0644 root bin 32658 7633 1339017365'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/locale/es/LC_MESSAGES/cadaver.mo',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/locale/es/LC_MESSAGES/cadaver.mo 0644 root bin 13554 44368 1339017365'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/locale/it/LC_MESSAGES/cadaver.mo',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/locale/it/LC_MESSAGES/cadaver.mo 0644 root bin 13689 56410 1339017365'},
+             {'type': 'd',
+              'class': None,
+              'path': '/opt/csw/share/man/man1',
+              'mode': '0755',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 d none /opt/csw/share/man/man1 0755 root bin'},
+             {'type': 'f',
+              'class': None,
+              'path': '/opt/csw/share/man/man1/cadaver.1',
+              'mode': '0644',
+              'user': 'root',
+              'group':  'bin',
+              'line': '1 f none /opt/csw/share/man/man1/cadaver.1 0644 root bin 4586 7373 1339017365'},
+             {'type': 'i', 
+              'class': None,
+              'path': None,
+              'mode': None,
+              'user': None,
+              'group': None,
+              'line': '1 i copyright 71 6651 1339017365'},
+             {'type': 'i', 
+              'class': None,
+              'path': None,
+              'mode': None,
+              'user': None,
+              'group': None,
+              'line': '1 i depend 452 39068 1339017371'},
+             {'type': 'i', 
+              'class': None,
+              'path': None,
+              'mode': None,
+              'user': None,
+              'group': None,
+              'line': '1 i pkginfo 552 45244 1339017374'}],
+}]

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/checkpkg_test_data_CSWdjvulibrert.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/checkpkg_test_data_CSWdjvulibrert.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/checkpkg_test_data_CSWdjvulibrert.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -111,6 +111,47 @@
              'sparcv8-fsmuld',
              'sparcv7',
              'sparc'),
+ 'ldd_info': {'opt/csw/lib/libdjvulibre.so.15': [],
+              'opt/csw/lib/sparcv9/libdjvulibre.so.21.1.0': [],
+	      'opt/csw/lib/libdjvulibre.so.21.1.0': [] },
+ 'binaries_elf_info': {'opt/csw/lib/libdjvulibre.so.15': {
+	  		'version definition': [],
+			'version needed': [],
+			'symbol table': [
+				{ 'soname': 'libjpeg.so.62', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libpthread.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libiconv.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libm.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libCstd.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libCrun.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				],
+			},
+                    'opt/csw/lib/sparcv9/libdjvulibre.so.21.1.0': {
+			     		'version definition': [],
+					'version needed': [],
+					'symbol table': [
+						{ 'soname': 'libjpeg.so.7', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libpthread.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libm.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libCstd.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libCrun.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						],
+			},
+	            'opt/csw/lib/libdjvulibre.so.21.1.0': {
+			     		'version definition': [],
+					'version needed': [],
+					'symbol table': [
+						{ 'soname': 'libjpeg.so.7', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libpthread.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libm.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libCstd.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libCrun.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+						{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+					],
+			},
+		    },
  'overrides': [],
  'pkginfo': {'ARCH': 'sparc',
              'CATEGORY': 'application',

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/ivtools_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/ivtools_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/ivtools_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -56,6 +56,21 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {'opt/csw/bin/comdraw': [],
+	       'opt/csw/lib/libComUnidraw.so.1.1.3': []},
+  'binaries_elf_info': {'opt/csw/bin/comdraw': { 
+	  		  'version definition': [],
+			  'version needed' : [],
+			  'symbol table': [
+	                       { 'soname': 'libComUnidraw.so', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' } ,
+			       ],
+		           },
+	                'opt/csw/lib/libComUnidraw.so.1.1.3': {
+	  		  'version definition': [],
+			  'version needed' : [],
+			  'symbol table': []
+			  }
+			},
   'overrides': [],
   'pkgchk': {'return_code': 0,
              'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/javasvn_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/javasvn_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/javasvn_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -86,6 +86,39 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {'opt/csw/lib/svn/libsvnjavahl-1.so.0.0.0': []},
+  'binaries_elf_info': { 'opt/csw/lib/svn/libsvnjavahl-1.so.0.0.0': {
+			  'version definition': [],
+		          'version needed': [],
+			  'symbol table': [
+				{ 'soname': 'libintl.so.8', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_repos-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_client-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_wc-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_ra-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_delta-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_diff-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_subr-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsvn_fs-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libaprutil-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libldap-2.4.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'liblber-2.4.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libexpat.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libiconv.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libapr-1.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libuuid.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsendfile.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'librt.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libpthread.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libdl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libneon.so.27', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libCstd.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+				{ 'soname': 'libCrun.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			]}
+		},
   'mtime': datetime.datetime(2010, 7, 12, 19, 6, 15),
   'overrides': [],
   'pkgchk': {'return_code': 0,

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/libnet_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/libnet_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/libnet_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -31,6 +31,8 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {},
+  'binaries_elf_info': {},
   'mtime': datetime.datetime(2008, 8, 20, 10, 26, 15),
   'overrides': [],
   'pkgchk': {'return_code': 0,

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/mercurial_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/mercurial_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/mercurial_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -703,6 +703,37 @@
                         'sparcv9',
                         'sparcv9+vis',
                         'sparcv9+vis2']),
+  'ldd_info': { 'opt/csw/lib/python/site-packages/mercurial/base85.so': [],
+		'opt/csw/lib/python/site-packages/mercurial/bdiff.so': [],
+                'opt/csw/lib/python/site-packages/mercurial/diffhelpers.so': [],
+		'opt/csw/lib/python/site-packages/mercurial/mpatch.so': [],
+		'opt/csw/lib/python/site-packages/mercurial/osutil.so': [],
+		'opt/csw/lib/python/site-packages/mercurial/parsers.so': [],},
+  'binaries_elf_info': { 'opt/csw/lib/python/site-packages/mercurial/base85.so': {
+	   		'version definition': [],
+			'version needed': [],
+			'symbol table': [] },
+		      'opt/csw/lib/python/site-packages/mercurial/bdiff.so': {
+			       		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+                      'opt/csw/lib/python/site-packages/mercurial/diffhelpers.so': {
+			       		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+		      'opt/csw/lib/python/site-packages/mercurial/mpatch.so': {
+			       		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+		      'opt/csw/lib/python/site-packages/mercurial/osutil.so': {
+			       		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+		      'opt/csw/lib/python/site-packages/mercurial/parsers.so': {
+			       		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+			      },
   'mtime': datetime.datetime(2011, 2, 15, 7, 46, 49),
   'overrides': [{'pkgname': 'CSWmercurial',
                  'tag_info': None,

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/neon_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/neon_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/neon_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -163,6 +163,27 @@
                         'pentium+mmx',
                         'pentium_pro',
                         'pentium_pro+mmx']),
+  'ldd_info': {'opt/csw/lib/libneon.so.26.0.4': [],
+	       'opt/csw/lib/libneon.so.27.2.0': [],
+	       'opt/csw/lib/sparcv9/libneon.so.26.0.4': [],
+	       'opt/csw/lib/sparcv9/libneon.so.27.2.0': []},
+  'binaries_elf_info': { 'opt/csw/lib/libneon.so.26.0.4': {
+		   		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	                 'opt/csw/lib/libneon.so.27.2.0': {
+			  		'version definition': [],
+					'version needed': [],
+					'symbol table': [] },
+	             'opt/csw/lib/sparcv9/libneon.so.26.0.4': {
+		      		'version definition': [],
+				'version needed': [],
+				'symbol table': [] },
+	             'opt/csw/lib/sparcv9/libneon.so.27.2.0': {
+				 		'version definition': [],
+						'version needed': [],
+						'symbol table': [] },
+		     },
   'mtime': datetime.datetime(2009, 9, 23, 20, 21, 14),
   'overrides': [],
   'pkgchk': {'return_code': 0,

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/rsync_pkg_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/rsync_pkg_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/rsync_pkg_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -74,17 +74,45 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': { 'opt/csw/bin/sparcv8/rsync': [], 
+		'opt/csw/bin/sparcv9/rsync': [] },
+  'binaries_elf_info': { 
+	'opt/csw/bin/sparcv8/rsync': { 
+		 		'version definition': [],
+				'version needed': [],
+				'symbol table': [
+		{ 'soname': 'libpopt.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libsec.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libiconv.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		]
+		},
+	'opt/csw/bin/sparcv9/rsync': { 
+		 		'version definition': [],
+				'version needed': [],
+				'symbol table': [
+		{ 'soname': 'libpopt.so.0', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libsec.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libiconv.so.2', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		{ 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		]
+		}
+	},
   'overrides': [],
   'pkgchk': {'return_code': 0,
-             'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',
-                              '/var/tmp/aaacuaqYV/CSWrsync'],
-             'stdout_lines': ['Checking uninstalled stream format package <CSWrsync> from </tmp/pkg_wq7Wyx/rsync-3.0.7,REV=2010.02.17-SunOS5.8-sparc-CSW.pkg>',
-                              '## Checking control scripts.',
-                              '## Checking package objects.',
-                              '## Checking is complete.']},
+             'stderr_lines': ['rm: cannot remove any directory in the path of the current working directory',
+                              '/var/tmp/aaacuaqyv/cswrsync'],
+             'stdout_lines': ['checking uninstalled stream format package <cswrsync> from </tmp/pkg_wq7wyx/rsync-3.0.7,rev=2010.02.17-sunos5.8-sparc-csw.pkg>',
+                              '## checking control scripts.',
+                              '## checking package objects.',
+                              '## checking is complete.']},
   'pkginfo': {'ARCH': 'sparc',
               'CATEGORY': 'application',
-              'CLASSES': 'none',
+              'CLASSES': 'None',
               'EMAIL': 'maciej at opencsw.org',
               'HOTLINE': 'http://www.opencsw.org/bugtrack/',
               'NAME': 'rsync - utility which provides fast incremental file transfer',
@@ -93,8 +121,8 @@
               'OPENCSW_REPOSITORY': 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/rsync/trunk@8611',
               'PKG': 'CSWrsync',
               'PSTAMP': 'maciej at build8s-20100217094608',
-              'VENDOR': 'http://rsync.samba.org/ packaged for CSW by Maciej Blizinski',
-              'VERSION': '3.0.7,REV=2010.02.17',
+              'VENDOR': 'http://rsync.samba.org/ packaged for csw by maciej blizinski',
+              'VERSION': '3.0.7,rev=2010.02.17',
               'WORKDIR_FIRSTMOD': '../build-isa-sparcv8'},
   'pkgmap': [{'class': None,
               'group': None,
@@ -103,65 +131,65 @@
               'path': None,
               'type': '1',
               'user': None},
-             {'class': 'none',
+             {'class': 'None',
               'group': None,
-              'line': '1 l none /opt/csw/bin/rsync=/opt/csw/bin/isaexec',
+              'line': '1 l None /opt/csw/bin/rsync=/opt/csw/bin/isaexec',
               'mode': None,
               'path': '/opt/csw/bin/rsync',
               'type': 'l',
               'user': None},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 f none /opt/csw/bin/sparcv8/rsync 0755 root bin 585864 12576 1266395028',
+              'line': '1 f None /opt/csw/bin/sparcv8/rsync 0755 root bin 585864 12576 1266395028',
               'mode': '0755',
               'path': '/opt/csw/bin/sparcv8/rsync',
               'type': 'f',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 f none /opt/csw/bin/sparcv9/rsync 0755 root bin 665520 60792 1266395239',
+              'line': '1 f None /opt/csw/bin/sparcv9/rsync 0755 root bin 665520 60792 1266395239',
               'mode': '0755',
               'path': '/opt/csw/bin/sparcv9/rsync',
               'type': 'f',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 d none /opt/csw/share/doc/rsync 0755 root bin',
+              'line': '1 d None /opt/csw/share/doc/rsync 0755 root bin',
               'mode': '0755',
               'path': '/opt/csw/share/doc/rsync',
               'type': 'd',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 f none /opt/csw/share/doc/rsync/license 0644 root bin 35147 30328 1266396366',
+              'line': '1 f None /opt/csw/share/doc/rsync/license 0644 root bin 35147 30328 1266396366',
               'mode': '0644',
               'path': '/opt/csw/share/doc/rsync/license',
               'type': 'f',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 d none /opt/csw/share/man/man1 0755 root bin',
+              'line': '1 d None /opt/csw/share/man/man1 0755 root bin',
               'mode': '0755',
               'path': '/opt/csw/share/man/man1',
               'type': 'd',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 f none /opt/csw/share/man/man1/rsync.1 0644 root bin 159739 65016 1266395027',
+              'line': '1 f None /opt/csw/share/man/man1/rsync.1 0644 root bin 159739 65016 1266395027',
               'mode': '0644',
               'path': '/opt/csw/share/man/man1/rsync.1',
               'type': 'f',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 d none /opt/csw/share/man/man5 0755 root bin',
+              'line': '1 d None /opt/csw/share/man/man5 0755 root bin',
               'mode': '0755',
               'path': '/opt/csw/share/man/man5',
               'type': 'd',
               'user': 'root'},
-             {'class': 'none',
+             {'class': 'None',
               'group': 'bin',
-              'line': '1 f none /opt/csw/share/man/man5/rsyncd.conf.5 0644 root bin 36372 24688 1266395027',
+              'line': '1 f None /opt/csw/share/man/man5/rsyncd.conf.5 0644 root bin 36372 24688 1266395027',
               'mode': '0644',
               'path': '/opt/csw/share/man/man5/rsyncd.conf.5',
               'type': 'f',

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/sudo_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/sudo_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/sudo_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -71,317 +71,349 @@
               'sparcv8-fsmuld',
               'sparcv7',
               'sparc'),
+  'ldd_info': {'opt/csw/libexec/sudo_noexec.so': [],
+	       'opt/csw/sbin/visudo': []},
+  'binaries_elf_info': {'opt/csw/libexec/sudo_noexec.so': { 
+			  'version needed': [],
+			  'version definition': [],
+			  'symbol table': [ { 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' } ],
+			},
+	             'opt/csw/sbin/visudo': { 
+			      		'version definition': [],
+					'version needed': [],
+					'symbol table': [
+			     { 'soname': 'libintl.so.8', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			     { 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			     { 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			     { 'soname': 'libc.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			     ],
+			}
+		     },
   'mtime': datetime.datetime(2010, 3, 2, 22, 34, 40),
   'overrides': [],
   'pkgchk': {'return_code': 0,
-             'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',
-                              '/var/tmp/aaajqaOvt/CSWsudo-common'],
-             'stdout_lines': ['Checking uninstalled stream format package <CSWsudo-common> from </tmp/pkg_4nepTE/sudo_common-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg>',
-                              '## Checking control scripts.',
-                              '## Checking package objects.',
-                              '## Checking is complete.']},
-  'pkginfo': {'ARCH': 'sparc',
-              'CATEGORY': 'application',
-              'CLASSES': 'none',
-              'EMAIL': 'maciej at opencsw.org',
-              'HOTLINE': 'http://www.opencsw.org/bugtrack/',
-              'NAME': 'sudo_common - Common files for sudo',
-              'OPENCSW_CATALOGNAME': 'sudo_common',
-              'OPENCSW_MODE64': '32',
-              'OPENCSW_REPOSITORY': 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/sudo/trunk@8935',
-              'PKG': 'CSWsudo-common',
-              'PSTAMP': 'maciej at build8s-20100302104744',
-              'VENDOR': 'ftp://ftp.sudo.ws/pub/sudo/ packaged for CSW by Maciej Blizinski',
-              'VERSION': '1.7.2p5,REV=2010.03.02',
-              'WORKDIR_FIRSTMOD': '../build-isa-sparcv8'},
-  'pkgmap': [{'class': None,
-              'group': None,
-              'line': ': 1 557',
-              'mode': None,
-              'path': None,
-              'type': '1',
-              'user': None},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/etc/sudoers.CSW 0644 root bin 715 61323 1267522149',
-              'mode': '0644',
-              'path': '/opt/csw/etc/sudoers.CSW',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/libexec 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/libexec',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/libexec/sudo_noexec.so 0755 root bin 5996 42161 1267522148',
-              'mode': '0755',
-              'path': '/opt/csw/libexec/sudo_noexec.so',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/sbin/visudo 0755 root bin 146604 53853 1267522152',
-              'mode': '0755',
-              'path': '/opt/csw/sbin/visudo',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/share/doc/sudo_common 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/share/doc/sudo_common',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/share/doc/sudo_common/license 0644 root bin 4423 15997 1267523256',
-              'mode': '0644',
-              'path': '/opt/csw/share/doc/sudo_common/license',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/share/man/man1m 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/share/man/man1m',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/share/man/man1m/sudo.1m 0644 root bin 33335 56127 1267522150',
-              'mode': '0644',
-              'path': '/opt/csw/share/man/man1m/sudo.1m',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': None,
-              'line': '1 l none /opt/csw/share/man/man1m/sudoedit.1m=/opt/csw/share/man/man1m/sudo.1m',
-              'mode': None,
-              'path': '/opt/csw/share/man/man1m/sudoedit.1m',
-              'type': 'l',
-              'user': None},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/share/man/man1m/visudo.1m 0644 root bin 12144 63550 1267522150',
-              'mode': '0644',
-              'path': '/opt/csw/share/man/man1m/visudo.1m',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/share/man/man4 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/share/man/man4',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/share/man/man4/sudoers.4 0644 root bin 71819 39000 1267522151',
-              'mode': '0644',
-              'path': '/opt/csw/share/man/man4/sudoers.4',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /var/opt/csw/log 0755 root bin',
-              'mode': '0755',
-              'path': '/var/opt/csw/log',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /var/opt/csw/log/sudo 0755 root bin',
-              'mode': '0755',
-              'path': '/var/opt/csw/log/sudo',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /var/opt/csw/log/sudo/logs 0755 root bin',
-              'mode': '0755',
-              'path': '/var/opt/csw/log/sudo/logs',
-              'type': 'd',
-              'user': 'root'},
-             {'class': None,
-              'group': None,
-              'line': '1 i copyright 75 7112 1267523256',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None},
-             {'class': None,
-              'group': None,
-              'line': '1 i depend 110 9928 1267523264',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None},
-             {'class': None,
-              'group': None,
-              'line': '1 i pkginfo 491 41276 1267523267',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None},
-             {'class': None,
-              'group': None,
-              'line': '1 i postinstall 321 26084 1237750445',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None}]},
- {'bad_paths': {},
-  'basic_stats': {'catalogname': 'sudo',
-                  'md5_sum': 'dce7f8da0edbb80ec4bdf697ccfc1846',
-                  'parsed_basename': {'arch': 'sparc',
-                                      'catalogname': 'sudo',
-                                      'full_version_string': '1.7.2p5,REV=2010.03.02',
-                                      'osrel': 'SunOS5.8',
-                                      'revision_info': {'REV': '2010.03.02'},
-                                      'vendortag': 'CSW',
-                                      'version': '1.7.2p5',
-                                      'version_info': {'major version': '1',
-                                                       'minor version': '7',
-                                                       'patchlevel': '2p5'}},
-                  'pkg_basename': 'sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg.gz',
-                  'pkg_path': '/tmp/pkg_CGJ5ja/sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg.gz',
-                  'pkgname': 'CSWsudo',
-                  'stats_version': 9L},
-  'binaries': ['opt/csw/bin/sudo.minimal'],
-  'binaries_dump_info': [{'RPATH set': True,
-                          'RUNPATH RPATH the same': True,
-                          'RUNPATH set': True,
-                          'base_name': 'sudo.minimal',
-                          'needed sonames': ('libpam.so.1',
-                                             'libdl.so.1',
-                                             'libintl.so.8',
-                                             'libsocket.so.1',
-                                             'libnsl.so.1',
-                                             'libc.so.1'),
-                          'path': 'opt/csw/bin/sudo.minimal',
-                          'runpath': ('/opt/csw/lib/$ISALIST',
-                                      '/opt/csw/lib')}],
-  'depends': [('CSWalternatives',
-               'CSWalternatives alternatives - Alternatives engine from Red Hat chkconfig-1.3.30c '),
-              ('CSWcommon',
-               'CSWcommon common - common files and dirs for CSW packages '),
-              ('CSWsudo-common',
-               'CSWsudo-common sudo_common - Common files for sudo '),
-              ('CSWggettextrt',
-               'CSWggettextrt ggettextrt - GNU locale utilities ')],
-  'files_metadata': [{'endian': 'Big endian',
-                      'machine_id': 2,
-                      'mime_type': 'application/x-executable; charset=binary',
-                      'mime_type_by_hachoir': u'application/x-executable',
-                      'path': 'opt/csw/bin/sudo.minimal'},
-                     {'mime_type': 'text/plain; charset=us-ascii',
-                      'path': 'opt/csw/share/alternatives/sudo'},
-                     {'mime_type': 'text/plain; charset=us-ascii',
-                      'path': 'opt/csw/share/doc/sudo/license'}],
-  'isalist': ('sparcv9+vis2',
-              'sparcv9+vis',
-              'sparcv9',
-              'sparcv8plus+vis2',
-              'sparcv8plus+vis',
-              'sparcv8plus',
-              'sparcv8',
-              'sparcv8-fsmuld',
-              'sparcv7',
-              'sparc'),
+		  'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',
+			  '/var/tmp/aaajqaOvt/CSWsudo-common'],
+		  'stdout_lines': ['Checking uninstalled stream format package <CSWsudo-common> from </tmp/pkg_4nepTE/sudo_common-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg>',
+			  '## Checking control scripts.',
+			  '## Checking package objects.',
+			  '## Checking is complete.']},
+		  'pkginfo': {'ARCH': 'sparc',
+				  'CATEGORY': 'application',
+				  'CLASSES': 'none',
+				  'EMAIL': 'maciej at opencsw.org',
+				  'HOTLINE': 'http://www.opencsw.org/bugtrack/',
+				  'NAME': 'sudo_common - Common files for sudo',
+				  'OPENCSW_CATALOGNAME': 'sudo_common',
+				  'OPENCSW_MODE64': '32',
+				  'OPENCSW_REPOSITORY': 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/sudo/trunk@8935',
+				  'PKG': 'CSWsudo-common',
+				  'PSTAMP': 'maciej at build8s-20100302104744',
+				  'VENDOR': 'ftp://ftp.sudo.ws/pub/sudo/ packaged for CSW by Maciej Blizinski',
+				  'VERSION': '1.7.2p5,REV=2010.03.02',
+				  'WORKDIR_FIRSTMOD': '../build-isa-sparcv8'},
+		  'pkgmap': [{'class': None,
+			  'group': None,
+			  'line': ': 1 557',
+			  'mode': None,
+			  'path': None,
+			  'type': '1',
+			  'user': None},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/etc/sudoers.CSW 0644 root bin 715 61323 1267522149',
+				  'mode': '0644',
+				  'path': '/opt/csw/etc/sudoers.CSW',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 d none /opt/csw/libexec 0755 root bin',
+				  'mode': '0755',
+				  'path': '/opt/csw/libexec',
+				  'type': 'd',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/libexec/sudo_noexec.so 0755 root bin 5996 42161 1267522148',
+				  'mode': '0755',
+				  'path': '/opt/csw/libexec/sudo_noexec.so',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/sbin/visudo 0755 root bin 146604 53853 1267522152',
+				  'mode': '0755',
+				  'path': '/opt/csw/sbin/visudo',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 d none /opt/csw/share/doc/sudo_common 0755 root bin',
+				  'mode': '0755',
+				  'path': '/opt/csw/share/doc/sudo_common',
+				  'type': 'd',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/share/doc/sudo_common/license 0644 root bin 4423 15997 1267523256',
+				  'mode': '0644',
+				  'path': '/opt/csw/share/doc/sudo_common/license',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 d none /opt/csw/share/man/man1m 0755 root bin',
+				  'mode': '0755',
+				  'path': '/opt/csw/share/man/man1m',
+				  'type': 'd',
+				  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 f none /opt/csw/share/man/man1m/sudo.1m 0644 root bin 33335 56127 1267522150',
+					  'mode': '0644',
+					  'path': '/opt/csw/share/man/man1m/sudo.1m',
+					  'type': 'f',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': None,
+					  'line': '1 l none /opt/csw/share/man/man1m/sudoedit.1m=/opt/csw/share/man/man1m/sudo.1m',
+					  'mode': None,
+					  'path': '/opt/csw/share/man/man1m/sudoedit.1m',
+					  'type': 'l',
+					  'user': None},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 f none /opt/csw/share/man/man1m/visudo.1m 0644 root bin 12144 63550 1267522150',
+					  'mode': '0644',
+					  'path': '/opt/csw/share/man/man1m/visudo.1m',
+					  'type': 'f',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 d none /opt/csw/share/man/man4 0755 root bin',
+					  'mode': '0755',
+					  'path': '/opt/csw/share/man/man4',
+					  'type': 'd',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 f none /opt/csw/share/man/man4/sudoers.4 0644 root bin 71819 39000 1267522151',
+					  'mode': '0644',
+					  'path': '/opt/csw/share/man/man4/sudoers.4',
+					  'type': 'f',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 d none /var/opt/csw/log 0755 root bin',
+					  'mode': '0755',
+					  'path': '/var/opt/csw/log',
+					  'type': 'd',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 d none /var/opt/csw/log/sudo 0755 root bin',
+					  'mode': '0755',
+					  'path': '/var/opt/csw/log/sudo',
+					  'type': 'd',
+					  'user': 'root'},
+			  {'class': 'none',
+					  'group': 'bin',
+					  'line': '1 d none /var/opt/csw/log/sudo/logs 0755 root bin',
+					  'mode': '0755',
+					  'path': '/var/opt/csw/log/sudo/logs',
+					  'type': 'd',
+					  'user': 'root'},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i copyright 75 7112 1267523256',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i depend 110 9928 1267523264',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i pkginfo 491 41276 1267523267',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i postinstall 321 26084 1237750445',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None}]},
+			  {'bad_paths': {},
+					  'basic_stats': {'catalogname': 'sudo',
+						  'md5_sum': 'dce7f8da0edbb80ec4bdf697ccfc1846',
+						  'parsed_basename': {'arch': 'sparc',
+							  'catalogname': 'sudo',
+							  'full_version_string': '1.7.2p5,REV=2010.03.02',
+							  'osrel': 'SunOS5.8',
+							  'revision_info': {'REV': '2010.03.02'},
+							  'vendortag': 'CSW',
+							  'version': '1.7.2p5',
+							  'version_info': {'major version': '1',
+								  'minor version': '7',
+								  'patchlevel': '2p5'}},
+							  'pkg_basename': 'sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg.gz',
+							  'pkg_path': '/tmp/pkg_CGJ5ja/sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg.gz',
+							  'pkgname': 'CSWsudo',
+							  'stats_version': 9L},
+					  'binaries': ['opt/csw/bin/sudo.minimal'],
+					  'binaries_dump_info': [{'RPATH set': True,
+						  'RUNPATH RPATH the same': True,
+						  'RUNPATH set': True,
+						  'base_name': 'sudo.minimal',
+						  'needed sonames': ('libpam.so.1',
+							  'libdl.so.1',
+							  'libintl.so.8',
+							  'libsocket.so.1',
+							  'libnsl.so.1',
+							  'libc.so.1'),
+						  'path': 'opt/csw/bin/sudo.minimal',
+						  'runpath': ('/opt/csw/lib/$ISALIST',
+							  '/opt/csw/lib')}],
+						  'depends': [('CSWalternatives',
+							  'CSWalternatives alternatives - Alternatives engine from Red Hat chkconfig-1.3.30c '),
+							  ('CSWcommon',
+								  'CSWcommon common - common files and dirs for CSW packages '),
+							  ('CSWsudo-common',
+								  'CSWsudo-common sudo_common - Common files for sudo '),
+							  ('CSWggettextrt',
+								  'CSWggettextrt ggettextrt - GNU locale utilities ')],
+							  'files_metadata': [{'endian': 'Big endian',
+								  'machine_id': 2,
+								  'mime_type': 'application/x-executable; charset=binary',
+								  'mime_type_by_hachoir': u'application/x-executable',
+								  'path': 'opt/csw/bin/sudo.minimal'},
+								  {'mime_type': 'text/plain; charset=us-ascii',
+									  'path': 'opt/csw/share/alternatives/sudo'},
+								  {'mime_type': 'text/plain; charset=us-ascii',
+									  'path': 'opt/csw/share/doc/sudo/license'}],
+								  'isalist': ('sparcv9+vis2',
+									  'sparcv9+vis',
+									  'sparcv9',
+									  'sparcv8plus+vis2',
+									  'sparcv8plus+vis',
+									  'sparcv8plus',
+									  'sparcv8',
+									  'sparcv8-fsmuld',
+									  'sparcv7',
+									  'sparc'),
+								  'ldd_info': {'opt/csw/bin/sudo.minimal': []},
+  'binaries_elf_info': { 'opt/csw/bin/sudo.minimal': {
+		'version definition': [],
+		'version needed': [],
+		'symbol table': [
+			{ 'soname': 'libpam.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			{ 'soname': 'libdl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			{ 'soname': 'libintl.so.8', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			{ 'soname': 'libsocket.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			{ 'soname': 'libnsl.so.1', 'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+			{ 'soname': 'libc.so.1',  'symbol': 'foo', 'flags': 'DBL', 'external': True, 'bind': 'GLOB' },
+		]
+	  }
+  },
   'mtime': datetime.datetime(2010, 3, 2, 22, 34, 39),
   'overrides': [],
   'pkgchk': {'return_code': 0,
-             'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',
-                              '/var/tmp/aaaJFaizt/CSWsudo'],
-             'stdout_lines': ['Checking uninstalled stream format package <CSWsudo> from </tmp/pkg_CGJ5ja/sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg>',
-                              '## Checking control scripts.',
-                              '## Checking package objects.',
-                              '## Checking is complete.']},
-  'pkginfo': {'ARCH': 'sparc',
-              'CATEGORY': 'application',
-              'CLASSES': 'none cswalternatives',
-              'EMAIL': 'maciej at opencsw.org',
-              'HOTLINE': 'http://www.opencsw.org/bugtrack/',
-              'NAME': 'sudo - Provides limited super user privileges',
-              'OPENCSW_CATALOGNAME': 'sudo',
-              'OPENCSW_MODE64': '32',
-              'OPENCSW_REPOSITORY': 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/sudo/trunk@8935',
-              'PKG': 'CSWsudo',
-              'PSTAMP': 'maciej at build8s-20100302104739',
-              'VENDOR': 'ftp://ftp.sudo.ws/pub/sudo/ packaged for CSW by Maciej Blizinski',
-              'VERSION': '1.7.2p5,REV=2010.03.02',
-              'WORKDIR_FIRSTMOD': '../build-isa-sparcv8'},
-  'pkgmap': [{'class': None,
-              'group': None,
-              'line': ': 1 461',
-              'mode': None,
-              'path': None,
-              'type': '1',
-              'user': None},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/bin/sudo.minimal 4755 root bin 224092 24233 1267522152',
-              'mode': '4755',
-              'path': '/opt/csw/bin/sudo.minimal',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': None,
-              'line': '1 l none /opt/csw/bin/sudoedit.minimal=/opt/csw/bin/sudo.minimal',
-              'mode': None,
-              'path': '/opt/csw/bin/sudoedit.minimal',
-              'type': 'l',
-              'user': None},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/share/alternatives 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/share/alternatives',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'cswalternatives',
-              'group': 'bin',
-              'line': '1 f cswalternatives /opt/csw/share/alternatives/sudo 0644 root bin 125 10881 1267522155',
-              'mode': '0644',
-              'path': '/opt/csw/share/alternatives/sudo',
-              'type': 'f',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 d none /opt/csw/share/doc/sudo 0755 root bin',
-              'mode': '0755',
-              'path': '/opt/csw/share/doc/sudo',
-              'type': 'd',
-              'user': 'root'},
-             {'class': 'none',
-              'group': 'bin',
-              'line': '1 f none /opt/csw/share/doc/sudo/license 0644 root bin 4423 15997 1267523256',
-              'mode': '0644',
-              'path': '/opt/csw/share/doc/sudo/license',
-              'type': 'f',
-              'user': 'root'},
-             {'class': None,
-              'group': None,
-              'line': '1 i copyright 68 6368 1267523256',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None},
-             {'class': None,
-              'group': None,
-              'line': '1 i depend 247 22297 1267523258',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None},
-             {'class': None,
-              'group': None,
-              'line': '1 i pkginfo 503 42551 1267523262',
-              'mode': None,
-              'path': None,
-              'type': 'i',
-              'user': None}]}]
+		  'stderr_lines': ['rm: Cannot remove any directory in the path of the current working directory',
+			  '/var/tmp/aaaJFaizt/CSWsudo'],
+		  'stdout_lines': ['Checking uninstalled stream format package <CSWsudo> from </tmp/pkg_CGJ5ja/sudo-1.7.2p5,REV=2010.03.02-SunOS5.8-sparc-CSW.pkg>',
+			  '## Checking control scripts.',
+			  '## Checking package objects.',
+			  '## Checking is complete.']},
+		  'pkginfo': {'ARCH': 'sparc',
+				  'CATEGORY': 'application',
+				  'CLASSES': 'none cswalternatives',
+				  'EMAIL': 'maciej at opencsw.org',
+				  'HOTLINE': 'http://www.opencsw.org/bugtrack/',
+				  'NAME': 'sudo - Provides limited super user privileges',
+				  'OPENCSW_CATALOGNAME': 'sudo',
+				  'OPENCSW_MODE64': '32',
+				  'OPENCSW_REPOSITORY': 'https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/sudo/trunk@8935',
+				  'PKG': 'CSWsudo',
+				  'PSTAMP': 'maciej at build8s-20100302104739',
+				  'VENDOR': 'ftp://ftp.sudo.ws/pub/sudo/ packaged for CSW by Maciej Blizinski',
+				  'VERSION': '1.7.2p5,REV=2010.03.02',
+				  'WORKDIR_FIRSTMOD': '../build-isa-sparcv8'},
+		  'pkgmap': [{'class': None,
+			  'group': None,
+			  'line': ': 1 461',
+			  'mode': None,
+			  'path': None,
+			  'type': '1',
+			  'user': None},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/bin/sudo.minimal 4755 root bin 224092 24233 1267522152',
+				  'mode': '4755',
+				  'path': '/opt/csw/bin/sudo.minimal',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': None,
+				  'line': '1 l none /opt/csw/bin/sudoedit.minimal=/opt/csw/bin/sudo.minimal',
+				  'mode': None,
+				  'path': '/opt/csw/bin/sudoedit.minimal',
+				  'type': 'l',
+				  'user': None},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 d none /opt/csw/share/alternatives 0755 root bin',
+				  'mode': '0755',
+				  'path': '/opt/csw/share/alternatives',
+				  'type': 'd',
+				  'user': 'root'},
+			  {'class': 'cswalternatives',
+				  'group': 'bin',
+				  'line': '1 f cswalternatives /opt/csw/share/alternatives/sudo 0644 root bin 125 10881 1267522155',
+				  'mode': '0644',
+				  'path': '/opt/csw/share/alternatives/sudo',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 d none /opt/csw/share/doc/sudo 0755 root bin',
+				  'mode': '0755',
+				  'path': '/opt/csw/share/doc/sudo',
+				  'type': 'd',
+				  'user': 'root'},
+			  {'class': 'none',
+				  'group': 'bin',
+				  'line': '1 f none /opt/csw/share/doc/sudo/license 0644 root bin 4423 15997 1267523256',
+				  'mode': '0644',
+				  'path': '/opt/csw/share/doc/sudo/license',
+				  'type': 'f',
+				  'user': 'root'},
+			  {'class': None,
+				  'group': None,
+				  'line': '1 i copyright 68 6368 1267523256',
+				  'mode': None,
+				  'path': None,
+				  'type': 'i',
+				  'user': None},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i depend 247 22297 1267523258',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None},
+			  {'class': None,
+					  'group': None,
+					  'line': '1 i pkginfo 503 42551 1267523262',
+					  'mode': None,
+					  'path': None,
+					  'type': 'i',
+					  'user': None}]}]

Modified: csw/mgar/gar/v2-yann/lib/python/testdata/tree_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/testdata/tree_stats.py	2012-09-18 18:59:44 UTC (rev 19233)
+++ csw/mgar/gar/v2-yann/lib/python/testdata/tree_stats.py	2012-09-19 20:06:10 UTC (rev 19236)
@@ -47,6 +47,17 @@
                         'sparcv9',
                         'sparcv9+vis',
                         'sparcv9+vis2']),
+  'ldd_info': {'opt/csw/bin/tree': [] },
+  'binaries_elf_info': { 'opt/csw/bin/tree': { 'version definition': [], 
+	                                       'version needed': [], 
+			 		       'symbol table': [ { 'flags': 'DBL', 
+					 	                   'soname': 'libc.so.1', 
+							  	   'symbol': 'environ',
+								   'external': True,
+								   'version': None 
+								  } ] 
+					      }
+			      },
   'mtime': datetime.datetime(2010, 7, 5, 23, 48, 10),
   'overrides': [],
   'pkgchk': {'return_code': 0,

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list