[csw-devel] SF.net SVN: gar:[11657] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Thu Nov 18 12:33:33 CET 2010
Revision: 11657
http://gar.svn.sourceforge.net/gar/?rev=11657&view=rev
Author: wahwah
Date: 2010-11-18 11:33:33 +0000 (Thu, 18 Nov 2010)
Log Message:
-----------
mGAR v2: a bugfix for checkpkg_inspect_stats.py
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/checkpkg.py
csw/mgar/gar/v2/lib/python/package_stats.py
Modified: csw/mgar/gar/v2/lib/python/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg.py 2010-11-17 23:08:10 UTC (rev 11656)
+++ csw/mgar/gar/v2/lib/python/checkpkg.py 2010-11-18 11:33:33 UTC (rev 11657)
@@ -26,6 +26,7 @@
import database
import package
+import inspective_package
import package_checks
import package_stats
import models as m
@@ -1063,7 +1064,7 @@
md5s.append(arg)
else:
filenames.append(arg)
- srv4_pkgs = [package.CswSrv4File(x) for x in filenames]
+ srv4_pkgs = [inspective_package.InspectiveCswSrv4File(x) for x in filenames]
pkgstat_objs = []
bar = progressbar.ProgressBar()
bar.maxval = len(md5s) + len(srv4_pkgs)
Modified: csw/mgar/gar/v2/lib/python/package_stats.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_stats.py 2010-11-17 23:08:10 UTC (rev 11656)
+++ csw/mgar/gar/v2/lib/python/package_stats.py 2010-11-18 11:33:33 UTC (rev 11657)
@@ -244,15 +244,20 @@
sym = { 'address': fields[0], 'type': fields[1], 'name': fields[2] }
return sym
- def CollectStats(self, force=False):
+ def CollectStats(self, force=False, register_files=False):
"""Lazy stats collection."""
if force or not self.StatsExist():
- return self._CollectStats()
+ return self._CollectStats(register_files=register_files)
return self.ReadSavedStats()
- def _CollectStats(self):
+ def _CollectStats(self, register_files):
"""The list of variables needs to be synchronized with the one
at the top of this class.
+
+ Args:
+ register_files: Whether to register all files in the database, so that
+ they can be used for file collision checking.
+
"""
dir_pkg = self.GetInspectivePkg()
logging.debug("Collecting %s package statistics.", repr(dir_pkg.pkgname))
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