[csw-devel] SF.net SVN: gar:[12086] csw/mgar/gar/v2/lib/python

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Dec 27 12:02:09 CET 2010


Revision: 12086
          http://gar.svn.sourceforge.net/gar/?rev=12086&view=rev
Author:   wahwah
Date:     2010-12-27 11:02:09 +0000 (Mon, 27 Dec 2010)

Log Message:
-----------
checkpkg: A bugfix for lib pkg suggestions

checkpkg was using the wrong pkgname when suggesting dependencies for new
library packages.  From now on it'll be using the base pkgname:

RUNTIME_DEP_PKGS_CSWbase-pkg = CSWlib-pkg

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/dependency_checks.py
    csw/mgar/gar/v2/lib/python/dependency_checks_test.py
    csw/mgar/gar/v2/lib/python/package_checks.py

Modified: csw/mgar/gar/v2/lib/python/dependency_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/dependency_checks.py	2010-12-27 10:50:40 UTC (rev 12085)
+++ csw/mgar/gar/v2/lib/python/dependency_checks.py	2010-12-27 11:02:09 UTC (rev 12086)
@@ -260,7 +260,8 @@
 def SuggestLibraryPackage(error_mgr, messenger,
     pkgname, catalogname,
     description,
-    lib_path, lib_basename, soname):
+    lib_path, lib_basename, soname,
+    base_pkgname):
   escaped_soname = sharedlib_utils.EscapeRegex(soname)
   escaped_basename = sharedlib_utils.EscapeRegex(lib_basename)
   messenger.SuggestGarLine("# The following lines define a new package: "
@@ -284,7 +285,7 @@
       % (pkgname, description, soname))
   messenger.SuggestGarLine(
       "RUNTIME_DEP_PKGS_%s += %s"
-      % (pkgname, pkgname))
+      % (base_pkgname, pkgname))
   messenger.SuggestGarLine(
       "# The end of %s definition" % pkgname)
 

Modified: csw/mgar/gar/v2/lib/python/dependency_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/dependency_checks_test.py	2010-12-27 10:50:40 UTC (rev 12085)
+++ csw/mgar/gar/v2/lib/python/dependency_checks_test.py	2010-12-27 11:02:09 UTC (rev 12086)
@@ -298,6 +298,7 @@
     lib_path = "opt/csw/lib"
     lib_basename = "libfoo.so.1.2.3"
     lib_soname = "libfoo.so.1"
+    base_pkgname = "CSWfoo"
     messenger_mock.SuggestGarLine(
         r'# The following lines define a new package: CSWfoo-bar')
     messenger_mock.SuggestGarLine(
@@ -313,7 +314,7 @@
     messenger_mock.SuggestGarLine(
         'SPKG_DESC_CSWfoo-bar += A foo bar package, libfoo.so.1')
     messenger_mock.SuggestGarLine(
-        r'RUNTIME_DEP_PKGS_CSWfoo-bar += CSWfoo-bar')
+        r'RUNTIME_DEP_PKGS_CSWfoo += CSWfoo-bar')
     messenger_mock.SuggestGarLine(
         r'# The end of CSWfoo-bar definition')
     self.mox.ReplayAll()
@@ -322,7 +323,8 @@
         messenger_mock,
         pkgname, catalogname,
         description,
-        lib_path, lib_basename, lib_soname)
+        lib_path, lib_basename, lib_soname,
+        base_pkgname)
 
 
 class TestReportMissingDependencies(mox.MoxTestBase):

Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py	2010-12-27 10:50:40 UTC (rev 12085)
+++ csw/mgar/gar/v2/lib/python/package_checks.py	2010-12-27 11:02:09 UTC (rev 12086)
@@ -1004,7 +1004,8 @@
           policy_pkgname_list[0],
           policy_catalogname_list[0],
           description,
-          lib_path, lib_basename, soname)
+          lib_path, lib_basename, soname,
+          pkgname)
 
       check_names = False
     else:
@@ -1046,7 +1047,8 @@
           suggested_pkgname,
           policy_catalogname_list[0],
           description,
-          lib_path, lib_basename, soname)
+          lib_path, lib_basename, soname,
+          pkgname)
 
         messenger.OneTimeMessage(
             soname,


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