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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Fri Mar 26 21:27:19 CET 2010


Revision: 9387
          http://gar.svn.sourceforge.net/gar/?rev=9387&view=rev
Author:   wahwah
Date:     2010-03-26 20:27:18 +0000 (Fri, 26 Mar 2010)

Log Message:
-----------
mGAR v2: checkpkg, fixed a but causing set error tags to disappear.

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

Modified: csw/mgar/gar/v2/lib/python/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-26 16:20:38 UTC (rev 9386)
+++ csw/mgar/gar/v2/lib/python/checkpkg.py	2010-03-26 20:27:18 UTC (rev 9387)
@@ -657,7 +657,7 @@
         if "package-set" not in errors:
           errors["package-set"] = []
         errors["package-set"].append(error)
-    return a_dict
+    return errors
 
   def GetOptimizedAllStats(self, stats_obj_list):
     pkgs_data = []
@@ -798,23 +798,9 @@
     if self.debug:
       logging_level = logging.DEBUG
     pkgmap = SystemPkgmap()
-
-    # TODO: In order to process all the catalog, and load them all into the
-    # memory, we need to store them more efficiently.  Currently, the process
-    # grows up to 9GB of RAM usage, and it doesn't end there.  Some ideas how to
-    # use less RAM:
-    # - some values (tuples, lists) repeat, and there's no need to store
-    #   all the copies. Instead, store references.  (the Flyweight design
-    #   pattern)
-    # - enclose data loading in a separate function, which will merge data
-    #   from all the packages.
-    # 
-    # In other words, the following line needs to be smart:
-    # pkgs_data = [x.GetAllStats() for x in stats_obj_list]
     logging.debug("Loading all package statistics.")
     pkgs_data = self.GetOptimizedAllStats(stats_obj_list)
     logging.debug("All package statistics loaded.")
-
     # Individual checks
     for pkg_data in pkgs_data:
       pkgname = pkg_data["basic_stats"]["pkgname"]

Modified: csw/mgar/gar/v2/lib/python/dependency_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/dependency_checks.py	2010-03-26 16:20:38 UTC (rev 9386)
+++ csw/mgar/gar/v2/lib/python/dependency_checks.py	2010-03-26 20:27:18 UTC (rev 9387)
@@ -30,12 +30,14 @@
           BAD_COMBINATIONS = (
               ("/opt/csw/lib", "libdb-4.7.so", "Deprecated Berkeley DB location"),
           )
+          logger.debug("Checking deprecated library locations.")
           for bad_path, bad_soname, msg in BAD_COMBINATIONS:
             # print "resolved_path == bad_path", resolved_path, bad_path, resolved_path == bad_path
             # print "soname == bad_soname", soname, bad_soname, soname == bad_soname
             if resolved_path == bad_path and soname == bad_soname:
               logger.debug("Bad lib found: %s/%s", bad_path, bad_soname)
               error_mgr.ReportError(
+                  pkgname,
                   "deprecated-library",
                   "%s %s %s/%s" % (binary_info["path"], msg, resolved_path, soname))
           required_deps.append((req_pkg, reason))


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