[csw-devel] SF.net SVN: gar:[7788] csw/mgar/gar/v2-checkpkg/bin/checkpkg.d
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Dec 29 23:59:45 CET 2009
Revision: 7788
http://gar.svn.sourceforge.net/gar/?rev=7788&view=rev
Author: wahwah
Date: 2009-12-29 22:59:44 +0000 (Tue, 29 Dec 2009)
Log Message:
-----------
mGAR v2-checkpkg: Implemented 64-bit symlink emulation (/opt/csw/lib/64 --> amd64), added skipping libm.so.2
Modified Paths:
--------------
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg-libs.py
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py
Added Paths:
-----------
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/testdata/checkpkg_test_data_CSWmysql5client_8x.py
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/testdata/dump_output_1.py
Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg-libs.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg-libs.py 2009-12-29 11:32:30 UTC (rev 7787)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg-libs.py 2009-12-29 22:59:44 UTC (rev 7788)
@@ -16,10 +16,9 @@
import subprocess
import logging
import sys
+import textwrap
DUMP_BIN = "/usr/ccs/bin/dump"
-RUNPATH = "runpath"
-SONAME = "soname"
def GetIsalist():
args = ["isalist"]
@@ -68,60 +67,29 @@
# Assembling a data structure with the data about binaries.
# {
# <binary1 name>: { checkpkg.NEEDED_SONAMES: [...],
- # RUNPATH: [...]},
+ # checkpkg.RUNPATH: [...]},
# <binary2 name>: ...,
# ...
# }
#
for binary in binaries:
binary_base_name = binary.split("/")[-1]
- if binary_base_name not in needed_sonames_by_binary:
- needed_sonames_by_binary[binary_base_name] = {}
- binary_data = needed_sonames_by_binary[binary_base_name]
- if checkpkg.NEEDED_SONAMES not in binary_data:
- binary_data[checkpkg.NEEDED_SONAMES] = []
- if RUNPATH not in binary_data:
- binary_data[RUNPATH] = []
args = [DUMP_BIN, "-Lv", binary]
dump_proc = subprocess.Popen(args, stdout=subprocess.PIPE, env=env)
stdout, stderr = dump_proc.communicate()
ret = dump_proc.wait()
- for line in stdout.splitlines():
- fields = re.split(ws_re, line)
- # TODO: Make it a unit test
- # logging.debug("%s says: %s", DUMP_BIN, fields)
- if len(fields) < 3:
- continue
- if fields[1] == "NEEDED":
- binary_data[checkpkg.NEEDED_SONAMES].append(fields[2])
- elif fields[1] == "RUNPATH":
- binary_data[RUNPATH].extend(fields[2].split(":"))
- # Adding the default runtime path search option.
- binary_data[RUNPATH].append("/usr/lib")
- elif fields[1] == "SONAME":
- binary_data[SONAME] = fields[2]
- if SONAME in binary_data:
- filenames_by_soname[binary_data[SONAME]] = binary_base_name
- # TODO: make it a unit test
- # print needed_sonames_by_binary
+ binary_data = checkpkg.ParseDumpOutput(stdout)
+ needed_sonames_by_binary[binary_base_name] = binary_data
+ if checkpkg.SONAME in binary_data:
+ filenames_by_soname[binary_data[checkpkg.SONAME]] = binary_base_name
isalist = GetIsalist()
- # Building indexes
- runpath_by_needed_soname = {}
- # {"foo.so": ["/opt/csw/lib/gcc4", "/opt/csw/lib", ...],
- # ...
- # }
- needed_sonames = set()
- binaries_by_soname = {}
- for binary_name, data in needed_sonames_by_binary.iteritems():
- for soname in data[checkpkg.NEEDED_SONAMES]:
- needed_sonames.add(soname)
- if soname not in runpath_by_needed_soname:
- runpath_by_needed_soname[soname] = []
- runpath_by_needed_soname[soname].extend(data[RUNPATH])
- if soname not in binaries_by_soname:
- binaries_by_soname[soname] = set()
- binaries_by_soname[soname].add(binary_name)
+ # Building indexes by soname to simplify further processing
+ # These are indexes "by soname".
+ (needed_sonames,
+ binaries_by_soname,
+ runpath_by_needed_soname) = checkpkg.BuildIndexesBySoname(
+ needed_sonames_by_binary)
pkgmap = checkpkg.SystemPkgmap()
logging.debug("Determining the soname-package relationships.")
@@ -137,17 +105,20 @@
pkgs_by_filename[soname] = pkgname
# A shared object dependency/provisioning report, plus checking.
- # TODO: Rewrite this using cheetah
+ # TODO: Rewrite this using cheetah templates
if needed_sonames:
print "Analysis of sonames needed by the package set:"
for soname in needed_sonames:
+ logging.debug("Analyzing: %s", soname)
if soname in filenames_by_soname:
print "%s is provided by the package itself" % soname
elif soname in lines_by_soname:
- print ("%s is required by %s and provided by %s"
+ print ("%s is provided by %s and required by:"
% (soname,
- binaries_by_soname[soname],
repr(pkgs_by_filename[soname])))
+ filename_lines = textwrap.wrap(" ".join(sorted(binaries_by_soname[soname])), 75)
+ for line in filename_lines:
+ print " ", line
else:
print ("%s is required by %s, but we don't know what provides it."
% (soname, binaries_by_soname[soname]))
@@ -159,49 +130,61 @@
for checker in checkers:
orphan_sonames = set()
pkgname = checker.pkgname
- print "%s:" % pkgname
declared_dependencies = checker.GetDependencies()
- missing_deps, surplus_deps, orphan_sonames = checkpkg.AnalyzeDependencies(
- pkgname,
- declared_dependencies,
- binaries_by_pkgname,
- needed_sonames_by_binary,
- pkgs_by_filename,
- filenames_by_soname,
- pkg_by_any_filename)
-
- if options.debug or True:
- data_file_name = "/var/tmp/checkpkg-dep-testing-data-%s.py" % pkgname
+ if options.debug:
+ sanitized_pkgname = pkgname.replace("-", "_")
+ data_file_name = "/var/tmp/checkpkg_test_data_%s.py" % sanitized_pkgname
logging.warn("Saving test data to %s." % repr(data_file_name))
test_fd = open(data_file_name, "w")
- sanitized_pkgname = pkgname.replace("-", "_")
print >>test_fd, "# Testing data for %s" % pkgname
+ print >>test_fd, "# $Id$"
print >>test_fd, "DATA_PKGNAME =", repr(pkgname)
print >>test_fd, "DATA_DECLARED_DEPENDENCIES =", repr(declared_dependencies)
+
+
print >>test_fd, "DATA_BINARIES_BY_PKGNAME =", repr(binaries_by_pkgname)
print >>test_fd, "DATA_NEEDED_SONAMES_BY_BINARY =", repr(needed_sonames_by_binary)
print >>test_fd, "DATA_PKGS_BY_FILENAME =", repr(pkgs_by_filename)
print >>test_fd, "DATA_FILENAMES_BY_SONAME =", repr(filenames_by_soname)
print >>test_fd, "DATA_PKG_BY_ANY_FILENAME =", repr(pkg_by_any_filename)
print >>test_fd, "DATA_LINES_BY_SONAME =", repr(lines_by_soname)
+ print >>test_fd, "DATA_PKGMAP_CACHE =", repr(pkgmap.cache)
+ print >>test_fd, "DATA_BINARIES_BY_SONAME =", repr(binaries_by_soname)
+ print >>test_fd, "DATA_ISALIST =", repr(isalist)
test_fd.close()
+ missing_deps, surplus_deps, orphan_sonames = checkpkg.AnalyzeDependencies(
+ pkgname,
+ declared_dependencies,
+ binaries_by_pkgname,
+ needed_sonames_by_binary,
+ pkgs_by_filename,
+ filenames_by_soname,
+ pkg_by_any_filename)
+
# TODO: Rewrite this using cheetah templates.
+ print "%s:" % pkgname
+ msg_printed = False
if missing_deps:
print "SUGGESTION: you may want to add some or all of the following as depends:"
print " (Feel free to ignore SUNW or SPRO packages)"
for dep_pkgname in sorted(missing_deps):
print ">", dep_pkgname
+ msg_printed = True
if surplus_deps:
print "The following packages might be unnecessary dependencies:"
for dep_pkgname in surplus_deps:
print "? ", dep_pkgname
+ msg_printed = True
if orphan_sonames:
print "The following sonames don't belong to any package:"
for soname in sorted(orphan_sonames):
errors.append(checkpkg.Error("The following soname does't belong to "
"any package: %s" % soname))
print "! ", soname
+ msg_printed = True
+ if not msg_printed:
+ print "+ Dependencies of %s look good." % pkgname
print
if errors:
Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py 2009-12-29 11:32:30 UTC (rev 7787)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py 2009-12-29 22:59:44 UTC (rev 7788)
@@ -8,17 +8,24 @@
import os.path
import logging
import subprocess
-import cPickle
import re
import sqlite3
+import socket
SYSTEM_PKGMAP = "/var/sadm/install/contents"
WS_RE = re.compile(r"\s+")
NEEDED_SONAMES = "needed sonames"
-# Don't report these as unnecessary.
-TYPICAL_DEPENDENCIES = set(["CSWcommon", "CSWcswclassutils", "CSWisaexec"])
+RUNPATH = "runpath"
+SONAME = "soname"
+DO_NOT_REPORT_SURPLUS = set([u"CSWcommon", u"CSWcswclassutils", u"CSWisaexec"])
+DO_NOT_REPORT_MISSING = set([u"SUNWlibC", u"SUNWcsl", u"SUNWlibms",
+ u"*SUNWcslr", u"*SUNWlibC", u"*SUNWlibms"])
+# This shared library is present on Solaris 10 on amd64, but it's missing on
+# Solaris 8 on i386. It's okay if it's missing.
+ALLOWED_ORPHAN_SONAMES = set([u"libm.so.2"])
+
class Error(Exception):
pass
@@ -61,6 +68,10 @@
% self.pkgpath)
def ListBinaries(self):
+ """Shells out to list all the binaries from a given package.
+
+ Original checkpkg code:
+
# #########################################
# # find all executables and dynamic libs,and list their filenames.
# listbinaries() {
@@ -72,6 +83,7 @@
#
# find $1 -print | xargs file |grep ELF |nawk -F: '{print $1}'
# }
+ """
self.CheckPkgpathExists()
find_tmpl = "find %s -print | xargs file | grep ELF | nawk -F: '{print $1}'"
find_proc = subprocess.Popen(find_tmpl % self.pkgpath,
@@ -101,11 +113,14 @@
class SystemPkgmap(object):
- """A class to hold and manipulate the /var/sadm/install/contents file."""
+ """A class to hold and manipulate the /var/sadm/install/contents file.
+
+ TODO: Implement timestamp checking and refreshing the cache.
+ """
STOP_PKGS = ["SUNWbcp", "SUNWowbcp", "SUNWucb"]
CHECKPKG_DIR = ".checkpkg"
- SQLITE3_DBNAME = "var-sadm-install-contents-cache"
+ SQLITE3_DBNAME_TMPL = "var-sadm-install-contents-cache-%s"
def __init__(self):
"""There is no need to re-parse it each time.
@@ -113,12 +128,15 @@
Read it slowly the first time and cache it for later."""
self.cache = {}
self.checkpkg_dir = os.path.join(os.environ["HOME"], self.CHECKPKG_DIR)
- self.db_path = os.path.join(self.checkpkg_dir, self.SQLITE3_DBNAME)
+ self.fqdn = socket.getfqdn()
+ self.db_path = os.path.join(self.checkpkg_dir,
+ self.SQLITE3_DBNAME_TMPL % self.fqdn)
if os.path.exists(self.db_path):
logging.debug("Connecting to the %s database.", self.db_path)
self.conn = sqlite3.connect(self.db_path)
else:
- logging.info("Building a cache of /var/sadm/install/contents.")
+ print "Building a cache of /var/sadm/install/contents."
+ print "The cache will be kept in %s." % self.db_path
if not os.path.exists(self.checkpkg_dir):
logging.debug("Creating %s", self.checkpkg_dir)
os.mkdir(self.checkpkg_dir)
@@ -133,6 +151,8 @@
);
""")
+ # Original bit of code from checkpkg:
+ #
# egrep -v 'SUNWbcp|SUNWowbcp|SUNWucb' /var/sadm/install/contents |
# fgrep -f $EXTRACTDIR/liblist >$EXTRACTDIR/shortcatalog
@@ -142,7 +162,7 @@
# Creating a data structure:
# soname - {<path1>: <line1>, <path2>: <line2>, ...}
- logging.debug("Building in-memory data structure for the %s file",
+ logging.debug("Building sqlite3 cache db of the %s file",
SYSTEM_PKGMAP)
for line in system_pkgmap_fd:
if stop_re.search(line):
@@ -151,20 +171,22 @@
pkgmap_entry_path = fields[0].split("=")[0]
pkgmap_entry_dir, pkgmap_entry_base_name = os.path.split(pkgmap_entry_path)
sql = "INSERT INTO systempkgmap (basename, path, line) VALUES (?, ?, ?);"
- c.execute(sql, (pkgmap_entry_base_name, pkgmap_entry_dir, line))
- logging.info("Creating an index.")
+ c.execute(sql, (pkgmap_entry_base_name, pkgmap_entry_dir, line.strip()))
+ print "Creating a database index."
sql = "CREATE INDEX basename_idx ON systempkgmap(basename);"
self.conn.execute(sql)
def GetPkgmapLineByBasename(self, filename):
if filename in self.cache:
- return self.cache[filename]
+ return self.cache[filename]
sql = "SELECT path, line FROM systempkgmap WHERE basename = ?;"
c = self.conn.cursor()
c.execute(sql, [filename])
lines = {}
for row in c:
lines[row[0]] = row[1]
+ if len(lines) == 0:
+ logging.debug("Cache doesn't contain filename %s", filename)
self.cache[filename] = lines
return lines
@@ -178,20 +200,46 @@
orphan_sonames = set()
self_provided = set()
for binary in binaries_by_pkgname[pkgname]:
- if binary in needed_sonames_by_binary:
- for soname in needed_sonames_by_binary[binary][NEEDED_SONAMES]:
- if soname in filenames_by_soname:
- filename = filenames_by_soname[soname]
- pkg = pkg_by_any_filename[filename]
- self_provided.add(soname)
- so_dependencies.add(pkg)
- elif soname in pkgs_by_soname:
- so_dependencies.add(pkgs_by_soname[soname])
- else:
- orphan_sonames.add(soname)
+ # tmp_so_dependencies, tmp_self_provided, tmp_orphan_sonames = DependenciesOfABinary(
+ # binary, binaries_by_pkgname, needed_sonames_by_binary,
+ # pkgs_by_soname, filenames_by_soname, pkg_by_any_filename)
+ # so_dependencies.union(tmp_so_dependencies)
+ # orphan_sonames.union(tmp_orphan_sonames)
+ # self_provided.union(tmp_self_provided)
+ needed_sonames = needed_sonames_by_binary[binary][NEEDED_SONAMES]
+ # DependenciesOfABinary(binary, needed_sonames, filenames_by_soname, pkgs_by_soname)
+ for soname in needed_sonames:
+ if soname in filenames_by_soname:
+ filename = filenames_by_soname[soname]
+ pkg = pkg_by_any_filename[filename]
+ self_provided.add(soname)
+ so_dependencies.add(pkg)
+ elif soname in pkgs_by_soname:
+ so_dependencies.add(pkgs_by_soname[soname])
+ else:
+ orphan_sonames.add(soname)
+ return so_dependencies, self_provided, orphan_sonames
+
+
+def DependenciesOfABinary(binary,
+ binaries_by_pkgname,
+ needed_sonames_by_binary,
+ pkgs_by_soname,
+ filenames_by_soname,
+ pkg_by_any_filename):
+ so_dependencies = set()
+ orphan_sonames = set()
+ self_provided = set()
+ for soname in needed_sonames_by_binary[binary][NEEDED_SONAMES]:
+ if soname in filenames_by_soname:
+ filename = filenames_by_soname[soname]
+ pkg = pkg_by_any_filename[filename]
+ self_provided.add(soname)
+ so_dependencies.add(pkg)
+ elif soname in pkgs_by_soname:
+ so_dependencies.add(pkgs_by_soname[soname])
else:
- logging.warn("%s not found in needed_sonames_by_binary (%s)",
- binary, needed_sonames_by_binary.keys())
+ orphan_sonames.add(soname)
return so_dependencies, self_provided, orphan_sonames
@@ -283,20 +331,39 @@
missing_deps = auto_dependencies.difference(declared_dependencies_set)
# Don't report itself as a suggested dependency.
missing_deps = missing_deps.difference(set([pkgname]))
+ missing_deps = missing_deps.difference(set(DO_NOT_REPORT_MISSING))
surplus_deps = declared_dependencies_set.difference(auto_dependencies)
- surplus_deps = surplus_deps.difference(TYPICAL_DEPENDENCIES)
+ surplus_deps = surplus_deps.difference(DO_NOT_REPORT_SURPLUS)
+ orphan_sonames = orphan_sonames.difference(ALLOWED_ORPHAN_SONAMES)
return missing_deps, surplus_deps, orphan_sonames
def ExpandRunpath(runpath, isalist):
+ # Emulating $ISALIST expansion
if '$ISALIST' in runpath:
- runpath_expanded_list = [runpath.replace('$ISALIST', isa) for isa in isalist]
+ expanded_list = [runpath.replace('$ISALIST', isa) for isa in isalist]
else:
- runpath_expanded_list = [runpath]
- return runpath_expanded_list
+ expanded_list = [runpath]
+ return expanded_list
+def Emulate64BitSymlinks(runpath_list):
+ """Need to emulate the 64 -> amd64, 64 -> sparcv9 symlink
+ Since we don't know the architecture, we'll adding both amd64 and sparcv9.
+ It should be safe.
+ """
+ symlinked_list = []
+ for runpath in runpath_list:
+ if runpath.endswith("/64"):
+ symlinked_list.append("%s/amd64" % runpath[:-3])
+ symlinked_list.append("%s/sparcv9" % runpath[:-3])
+ else:
+ symlinked_list.append(runpath)
+ return symlinked_list
+
+
def GetLinesBySoname(pkgmap, needed_sonames, runpath_by_needed_soname, isalist):
+ """Works out which system pkgmap lines correspond to given sonames."""
lines_by_soname = {}
for soname in needed_sonames:
# This is the critical part of the algorithm: it iterates over the
@@ -304,7 +371,10 @@
runpath_found = False
for runpath in runpath_by_needed_soname[soname]:
runpath_list = ExpandRunpath(runpath, isalist)
+ runpath_list = Emulate64BitSymlinks(runpath_list)
soname_runpath_data = pkgmap.GetPkgmapLineByBasename(soname)
+ logging.debug("%s: will be looking for %s in %s" %
+ (soname, runpath_list, soname_runpath_data.keys()))
for runpath_expanded in runpath_list:
if runpath_expanded in soname_runpath_data:
lines_by_soname[soname] = soname_runpath_data[runpath_expanded]
@@ -313,5 +383,49 @@
# need another one below to finish the outer loop.
break
if runpath_found:
- break
+ break
return lines_by_soname
+
+
+def BuildIndexesBySoname(needed_sonames_by_binary):
+ """Builds data structures indexed by soname.
+
+ Building indexes
+ {"foo.so": ["/opt/csw/lib/gcc4", "/opt/csw/lib", ...],
+ ...
+ }
+ """
+ needed_sonames = set()
+ binaries_by_soname = {}
+ runpath_by_needed_soname = {}
+ for binary_name, data in needed_sonames_by_binary.iteritems():
+ for soname in data[NEEDED_SONAMES]:
+ needed_sonames.add(soname)
+ if soname not in runpath_by_needed_soname:
+ runpath_by_needed_soname[soname] = []
+ runpath_by_needed_soname[soname].extend(data[RUNPATH])
+ if soname not in binaries_by_soname:
+ binaries_by_soname[soname] = set()
+ binaries_by_soname[soname].add(binary_name)
+ return needed_sonames, binaries_by_soname, runpath_by_needed_soname
+
+
+def ParseDumpOutput(dump_output):
+ binary_data = {RUNPATH: [],
+ NEEDED_SONAMES: []}
+ for line in dump_output.splitlines():
+ fields = re.split(WS_RE, line)
+ # TODO: Make it a unit test
+ # logging.debug("%s says: %s", DUMP_BIN, fields)
+ if len(fields) < 3:
+ continue
+ if fields[1] == "NEEDED":
+ binary_data[NEEDED_SONAMES].append(fields[2])
+ elif fields[1] == "RUNPATH":
+ binary_data[RUNPATH].extend(fields[2].split(":"))
+ # Adding the default runtime path search option.
+ binary_data[RUNPATH].append("/usr/lib/$ISALIST")
+ binary_data[RUNPATH].append("/usr/lib")
+ elif fields[1] == "SONAME":
+ binary_data[SONAME] = fields[2]
+ return binary_data
Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py 2009-12-29 11:32:30 UTC (rev 7787)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py 2009-12-29 22:59:44 UTC (rev 7788)
@@ -9,7 +9,24 @@
import testdata.checkpkg_test_data_CSWmysql51 as d3
import testdata.checkpkg_test_data_CSWmysql51devel as d4
import testdata.checkpkg_test_data_CSWlibpq_84 as d5
+import testdata.checkpkg_test_data_CSWmysql5client_8x as d6
+import testdata.dump_output_1 as dump_1
+"""A set of unit tests for the library checking code.
+
+A bunch of lines to test in the interactive Python shell.
+
+import sys
+sys.path.append("gar/bin/checkpkg.d")
+import checkpkg
+import testdata.checkpkg_test_data_CSWmysql5client_8x as d6
+
+checkpkg.SharedObjectDependencies("CSWmysql5client", d6.DATA_BINARIES_BY_PKGNAME, d6.DATA_NEEDED_SONAMES_BY_BINARY, d6.DATA_PKGS_BY_FILENAME, d6.DATA_FILENAMES_BY_SONAME, d6.DATA_PKG_BY_ANY_FILENAME)
+
+sqlite3 ~/.checkpkg/var-sadm-install-contents-cache-build8x
+SELECT * FROM systempkgmap WHERE basename = 'libncursesw.so.5';
+"""
+
class DependenciesUnitTest_1(unittest.TestCase):
def setUp(self):
@@ -30,7 +47,7 @@
self.assertEquals(set([]), self.orphan_sonames)
def testMissingDeps(self):
- expected = set([u'SUNWcsl', u'SUNWlibms', u'SUNWlibC'])
+ expected = set([])
self.assertEquals(expected, self.missing_deps)
@@ -54,7 +71,7 @@
self.assertEquals(set([]), self.orphan_sonames)
def testMissingDeps(self):
- expected = set([u'SUNWlibC', u'SUNWcsl', u'SUNWlibms'])
+ expected = set([])
self.assertEquals(expected, self.missing_deps)
@@ -78,7 +95,7 @@
self.assertEquals(set([]), self.orphan_sonames)
def testMissingDeps(self):
- expected = set(['CSWmysql51rt', u'SUNWcsl', u'SUNWlibms', u'SUNWlibC'])
+ expected = set(['CSWmysql51rt'])
self.assertEquals(expected, self.missing_deps)
@@ -127,10 +144,36 @@
def testMissingDeps(self):
# This tends to report itself...
- expected = set([u'SUNWgss', u'SUNWcsl', u'SUNWlibms'])
+ expected = set([u'SUNWgss'])
self.assertEquals(expected, self.missing_deps)
+class DependenciesUnitTest_6(unittest.TestCase):
+
+ def setUp(self):
+ (self.missing_deps,
+ self.surplus_deps,
+ self.orphan_sonames) = checkpkg.AnalyzeDependencies(
+ d6.DATA_PKGNAME,
+ d6.DATA_DECLARED_DEPENDENCIES,
+ d6.DATA_BINARIES_BY_PKGNAME,
+ d6.DATA_NEEDED_SONAMES_BY_BINARY,
+ d6.DATA_PKGS_BY_FILENAME,
+ d6.DATA_FILENAMES_BY_SONAME,
+ d6.DATA_PKG_BY_ANY_FILENAME,
+ )
+
+ def testSurplusDeps(self):
+ self.assertEquals(set([]), self.surplus_deps)
+
+ def testOrphanSonames(self):
+ self.assertEquals(set([]), self.orphan_sonames)
+
+ def testMissingDeps(self):
+ expected = set([])
+ self.assertEquals(expected, self.missing_deps)
+
+
class GuessDepsUnitTest(unittest.TestCase):
def testGuessDepsByFilename1(self):
@@ -195,16 +238,30 @@
class GetLinesBySonameUnitTest(unittest.TestCase):
+ class PkgmapStub(object):
+
+ def __init__(self, cache):
+ self.cache = cache
+
+ def GetPkgmapLineByBasename(self, soname):
+ return self.cache[soname]
+
def setUp(self):
self.pkgmap_mocker = mox.Mox()
- def testExpandRunpath(self):
+ def testExpandRunpath_1(self):
isalist = ["foo", "bar"]
runpath = "/opt/csw/lib/$ISALIST"
expected = ["/opt/csw/lib/foo", "/opt/csw/lib/bar"]
self.assertEquals(expected, checkpkg.ExpandRunpath(runpath, isalist))
- def test_1(self):
+ def testExpandRunpath_2(self):
+ isalist = ["foo", "bar"]
+ runpath = "/opt/csw/mysql5/lib/$ISALIST/mysql"
+ expected = ["/opt/csw/mysql5/lib/foo/mysql", "/opt/csw/mysql5/lib/bar/mysql"]
+ self.assertEquals(expected, checkpkg.ExpandRunpath(runpath, isalist))
+
+ def testGetLinesBySoname(self):
expected = {'foo.so.1': '/opt/csw/lib/isa-value-1/foo.so.1 foo'}
pkgmap = self.pkgmap_mocker.CreateMock(checkpkg.SystemPkgmap)
pkgmap.GetPkgmapLineByBasename("foo")
@@ -221,24 +278,135 @@
self.pkgmap_mocker.VerifyAll()
self.assertEqual(expected, result)
- def test_2(self):
+ def testGetLinesBySoname_3(self):
expected = {'foo.so.1': '/opt/csw/lib/isa-value-1/foo.so.1 foo'}
pkgmap = self.pkgmap_mocker.CreateMock(checkpkg.SystemPkgmap)
pkgmap.GetPkgmapLineByBasename("foo")
- lines1 = {"/opt/csw/lib/isa-value-1": "/opt/csw/lib/isa-value-1/foo.so.1 foo",
- "/opt/csw/lib": "/opt/csw/lib/foo.so.1 foo",
- "/usr/lib": "/usr/lib/foo.so.1 foo"}
+ lines1 = {
+ "/opt/csw/lib/isa-value-1": "/opt/csw/lib/isa-value-1/foo.so.1 foo",
+ "/opt/csw/lib": "/opt/csw/lib/foo.so.1 foo",
+ "/usr/lib": "/usr/lib/foo.so.1 foo"}
# pkgmap.GetPkgmapLineByBasename("foo.so.1").AndReturn(lines1)
pkgmap.GetPkgmapLineByBasename("foo.so.1").AndReturn(lines1)
self.pkgmap_mocker.ReplayAll()
pkgmap.GetPkgmapLineByBasename("foo")
needed_sonames = set(["foo.so.1"])
- runpath_by_needed_soname = {"foo.so.1": ["/opt/csw/lib/$ISALIST", "/usr/lib"]}
+ runpath_by_needed_soname = {
+ "foo.so.1": ["/opt/csw/lib/$ISALIST", "/usr/lib"]}
isalist = ["isa-value-1", "isa-value-2"]
- result = checkpkg.GetLinesBySoname(pkgmap, needed_sonames, runpath_by_needed_soname, isalist)
+ result = checkpkg.GetLinesBySoname(
+ pkgmap, needed_sonames, runpath_by_needed_soname, isalist)
self.pkgmap_mocker.VerifyAll()
self.assertEqual(expected, result)
+ def testGetLinesBySoname_4(self):
+ """A more complex test, four ISAs."""
+ expected = {'foo.so.1': '/opt/csw/lib/isa-value-1/foo.so.1 foo'}
+ pkgmap = self.pkgmap_mocker.CreateMock(checkpkg.SystemPkgmap)
+ pkgmap.GetPkgmapLineByBasename("foo")
+ lines1 = {
+ "/opt/csw/lib/isa-value-1":
+ "/opt/csw/lib/isa-value-1/foo.so.1 foo",
+ "/opt/csw/mysql5/lib/isa-value-2":
+ "/opt/csw/mysql5/lib/isa-value-2/foo.so.1 foo",
+ "/opt/csw/mysql5/lib/isa-value-1":
+ "/opt/csw/mysql5/lib/isa-value-1/foo.so.1 foo",
+ "/opt/csw/lib":
+ "/opt/csw/lib/foo.so.1 foo",
+ "/usr/lib":
+ "/usr/lib/foo.so.1 foo"}
+ pkgmap.GetPkgmapLineByBasename("foo.so.1").AndReturn(lines1)
+ pkgmap.GetPkgmapLineByBasename("foo.so.1").AndReturn(lines1)
+ self.pkgmap_mocker.ReplayAll()
+ pkgmap.GetPkgmapLineByBasename("foo")
+ needed_sonames = set(["foo.so.1"])
+ runpath_by_needed_soname = {
+ "foo.so.1": ["/opt/csw/mysql5/lib/$ISALIST/mysql",
+ "/opt/csw/lib/$ISALIST",
+ "/usr/lib"]}
+ isalist = ["isa-value-1", "isa-value-2"]
+ result = checkpkg.GetLinesBySoname(
+ pkgmap, needed_sonames, runpath_by_needed_soname, isalist)
+ self.pkgmap_mocker.VerifyAll()
+ self.assertEqual(expected, result)
+ def testGetLinesBySoname_5(self):
+ """Based on CSWmysql5client on build8x."""
+ soname = u'libm.so.1'
+ expected = {u'libm.so.1': u'/usr/lib/libm.so.1 f none 0755 root bin '
+ u'99844 3884 1050525375 SUNWlibms\n'}
+
+ pkgmap_stub = self.PkgmapStub(d6.DATA_PKGMAP_CACHE)
+ (needed_sonames,
+ binaries_by_soname,
+ runpath_by_needed_soname) = checkpkg.BuildIndexesBySoname(
+ d6.DATA_NEEDED_SONAMES_BY_BINARY)
+ result = checkpkg.GetLinesBySoname(
+ pkgmap_stub,
+ set([soname]),
+ runpath_by_needed_soname,
+ d6.DATA_ISALIST)
+ self.assertEqual(expected, result)
+
+ def testGetLinesBySoname_6(self):
+ """Based on CSWmysql5client on build8x."""
+ soname = u'libz.so.1'
+ expected = {u'libz.so.1': u'/opt/csw/lib/pentium_pro+mmx/libz.so.1=libz.so.1.2.3 '
+ u's none CSWzlib\n'}
+ pkgmap_stub = self.PkgmapStub(d6.DATA_PKGMAP_CACHE)
+ (needed_sonames,
+ binaries_by_soname,
+ runpath_by_needed_soname) = checkpkg.BuildIndexesBySoname(
+ d6.DATA_NEEDED_SONAMES_BY_BINARY)
+ result = checkpkg.GetLinesBySoname(
+ pkgmap_stub,
+ set([soname]),
+ runpath_by_needed_soname,
+ d6.DATA_ISALIST)
+ self.assertEqual(expected, result)
+
+ def testGetLinesBySoname_7(self):
+ """A test for 64-bit symlink expansion."""
+ soname = u'libncursesw.so.5'
+ # To test the 64-bit symlink expansion
+ expected = {u'libncursesw.so.5': u'/opt/csw/lib/amd64/libncursesw.so.5=libncursesw.so.5.7 s none CSWncurses\n'}
+ pkgmap_stub = self.PkgmapStub(d6.DATA_PKGMAP_CACHE)
+ (needed_sonames,
+ binaries_by_soname,
+ runpath_by_needed_soname) = checkpkg.BuildIndexesBySoname(
+ d6.DATA_NEEDED_SONAMES_BY_BINARY)
+ result = checkpkg.GetLinesBySoname(
+ pkgmap_stub,
+ set([soname]),
+ runpath_by_needed_soname,
+ d6.DATA_ISALIST)
+ self.assertEqual(expected, result)
+
+
+class ParseDumpOutputUnitTest(unittest.TestCase):
+
+ def test_1(self):
+ expected = {
+ 'soname': 'libmysqlclient.so.15',
+ 'runpath': ['/opt/csw/lib/$ISALIST',
+ '/opt/csw/lib',
+ '/opt/csw/mysql5/lib/$ISALIST',
+ '/opt/csw/mysql5/lib',
+ '/opt/csw/mysql5/lib/$ISALIST/mysql',
+ # These two are artificially appended
+ '/usr/lib/$ISALIST',
+ '/usr/lib'],
+ 'needed sonames': ['librt.so.1',
+ 'libresolv.so.2',
+ 'libc.so.1',
+ 'libgen.so.1',
+ 'libsocket.so.1',
+ 'libnsl.so.1',
+ 'libm.so.1',
+ 'libz.so.1']}
+ self.assertEqual(expected,
+ checkpkg.ParseDumpOutput(dump_1.DATA_DUMP_OUTPUT))
+
+
if __name__ == '__main__':
unittest.main()
Added: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/testdata/checkpkg_test_data_CSWmysql5client_8x.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/testdata/checkpkg_test_data_CSWmysql5client_8x.py (rev 0)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/testdata/checkpkg_test_data_CSWmysql5client_8x.py 2009-12-29 22:59:44 UTC (rev 7788)
@@ -0,0 +1,13 @@
+# Testing data for CSWmysql5client
+# $Id$
+DATA_PKGNAME = 'CSWmysql5client'
+DATA_DECLARED_DEPENDENCIES = {'CSWzlib': 'CSWzlib zlib - Zlib Data Compression Library ', 'CSWisaexec': 'CSWisaexec isaexec - sneaky wrapper around Sun isaexec ', 'CSWmysql5rt': 'CSWmysql5rt mysql5rt - MySQL 5.0 runtime files ', 'CSWncurses': 'CSWncurses ncurses - A free software emulation of curses ', 'CSWcommon': 'CSWcommon common - common files and dirs for CSW packages '}
+DATA_BINARIES_BY_PKGNAME = {'CSWmysql5test': [], 'CSWmysql5rt': ['libmysqlclient.so.15.0.0', 'libmysqlclient.so.15.0.0'], 'CSWmysql5client': ['mysqlimport', 'perror', 'mysqldump', 'mysqlbinlog', 'mysql', 'mysqlcheck', 'mysql_client_test', 'mysqladmin', 'mysqlshow', 'myisampack', 'myisamlog', 'replace', 'mysql_client_test', 'mysqlcheck', 'mysqladmin', 'mysqlimport', 'myisampack', 'mysqlshow', 'myisamlog', 'mysqlbinlog', 'replace', 'perror', 'mysqldump', 'mysql'], 'CSWmysql5bench': [], 'CSWmysql5devel': [], 'CSWmysql5': ['my_print_defaults', 'comp_err', 'mysqltestmanager-pwgen', 'innochecksum', 'resolveip', 'mysql_waitpid', 'mysqltestmanagerc', 'mysql_upgrade', 'myisam_ftdump', 'myisamchk', 'resolve_stack_dump', 'mysqltest', 'mysql_tzinfo_to_sql', 'resolve_stack_dump', 'mysqltestmanagerc', 'innochecksum', 'mysqltestmanager-pwgen', 'myisam_ftdump', 'my_print_defaults', 'mysql_upgrade', 'mysql_tzinfo_to_sql', 'resolveip', 'comp_err', 'mysql_waitpid', 'mysqltest', 'myisamchk', 'm
ysqlmanager', 'mysqld', 'mysqld', 'mysqlmanager']}
+DATA_NEEDED_SONAMES_BY_BINARY = {'mysql_waitpid': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'comp_err': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libthread.so.1']}, 'replace': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.
1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'libmysqlclient.so.15.0.0': {'soname': 'libmysqlclient.so.15', 'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libz.so.1']}, 'myisamchk': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libthread.so.1']}, 'mysqldump': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIS
T', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/opt/csw/mysql5/lib/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libz.so.1', 'libthread.so.1']}, 'mysql': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7/amd64', '/opt/studio/SOS11/SUNWspro/lib/amd64', '/usr/ccs/lib/64', '/lib/64', '/usr/lib/64', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libncursesw.so.5', 'libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'myisam_ftdump': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST',
'/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'myisamlog': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'mysqlimport': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libns
l.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'mysqlcheck': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'mysqlmanager': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7/amd64', '/opt/studio/SOS11/SUNWspro/lib/amd64', '/usr/ccs/lib/64', '/lib/64', '/usr/lib/64', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libpthread.so.1', 'libz.so.1', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'mysqlad
min': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/opt/csw/mysql5/lib/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7', '/opt/studio/SOS11/SUNWspro/lib', '/opt/SUNWspro/lib', '/usr/ccs/lib', '/lib', '/usr/lib', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libz.so.1', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'mysqlshow': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'mysqltestmanager-pwgen': {'run
path': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/opt/csw/mysql5/lib/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libz.so.1', 'libthread.so.1']}, 'mysql_upgrade': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'innochecksum': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'n
eeded sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'mysqlbinlog': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/opt/csw/mysql5/lib/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7', '/opt/studio/SOS11/SUNWspro/lib', '/opt/SUNWspro/lib', '/usr/ccs/lib', '/lib', '/usr/lib', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libz.so.1', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'my_print_defaults': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'li
bpthread.so.1', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libthread.so.1']}, 'mysqld': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7/amd64', '/opt/studio/SOS11/SUNWspro/lib/amd64', '/usr/ccs/lib/64', '/lib/64', '/usr/lib/64', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['librt.so.1', 'libz.so.1', 'libdl.so.1', 'libpthread.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'myisampack': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl
.so.1', 'libm.so.1', 'libthread.so.1']}, 'mysql_tzinfo_to_sql': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/opt/studio/SOS11/SUNWspro/lib/rw7', '/opt/studio/SOS11/SUNWspro/lib', '/opt/SUNWspro/lib', '/usr/ccs/lib', '/lib', '/usr/lib', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libCstd.so.1', 'libCrun.so.1', 'libthread.so.1']}, 'perror': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'mysqltestmanagerc': {'runpath': ['/op
t/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'mysqltest': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}, 'resolve_stack_dump': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib', '/opt/csw/mysql5/lib/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames':
['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libresolv.so.2', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.1', 'libthread.so.1']}, 'resolveip': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libz.so.1', 'libpthread.so.1', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libthread.so.1']}, 'mysql_client_test': {'runpath': ['/opt/csw/lib/$ISALIST', '/opt/csw/lib/64', '/opt/csw/mysql5/lib/$ISALIST', '/opt/csw/mysql5/lib/64', '/opt/csw/mysql5/lib/64/$ISALIST/mysql', '/opt/csw/mysql5/lib/64/mysql', '/usr/lib/$ISALIST', '/usr/lib'], 'needed sonames': ['libmysqlclient.so.15', 'librt.so.1', 'libc.so.1', 'libgen.so.1', 'libsocket.so.1', 'libnsl.so.1', 'libm.so.2', 'libz.so.1', 'libthread.so.1']}}
+DATA_PKGS_BY_FILENAME = {'libresolv.so.2': u'SUNWcsl', 'libthread.so.1': u'SUNWcsl', 'libgen.so.1': u'SUNWcsl', 'libnsl.so.1': u'SUNWcsl', 'libmysqlclient.so.15': u'CSWmysql5rt', 'libCstd.so.1': u'SUNWlibC', 'libCrun.so.1': u'SUNWlibC', 'librt.so.1': u'SUNWcsl', 'libz.so.1': u'CSWzlib', 'libncursesw.so.5': u'CSWncurses', 'libsocket.so.1': u'SUNWcsl', 'libm.so.1': u'SUNWlibms', 'libpthread.so.1': u'SUNWcsl', 'libc.so.1': u'SUNWcsl', 'libdl.so.1': u'SUNWcsl'}
+DATA_FILENAMES_BY_SONAME = {'libmysqlclient.so.15': 'libmysqlclient.so.15.0.0'}
@@ Diff output truncated at 100000 characters. @@
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