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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Mar 28 10:49:06 CEST 2011


Revision: 13978
          http://gar.svn.sourceforge.net/gar/?rev=13978&view=rev
Author:   wahwah
Date:     2011-03-28 08:49:06 +0000 (Mon, 28 Mar 2011)

Log Message:
-----------
checkpkg: Random cleanup and comments.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/checkpkg2.py
    csw/mgar/gar/v2/lib/python/checkpkg_lib.py
    csw/mgar/gar/v2/lib/python/overrides.py
    csw/mgar/gar/v2/lib/python/overrides_test.py
    csw/mgar/gar/v2/lib/python/system_pkgmap.py

Property Changed:
----------------
    csw/mgar/gar/v2/lib/python/overrides_test.py

Modified: csw/mgar/gar/v2/lib/python/checkpkg2.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg2.py	2011-03-28 08:48:23 UTC (rev 13977)
+++ csw/mgar/gar/v2/lib/python/checkpkg2.py	2011-03-28 08:49:06 UTC (rev 13978)
@@ -150,7 +150,6 @@
     args = (sqo_osrel, sqo_arch, sqo_catrel)
     tag_lists = [list(pkg.GetErrorTagsResult(*args)) for pkg in sqo_pkgs]
     error_tags = reduce(operator.add, tag_lists)
-    # TODO: Set the 'overriden' tag for specific error tags
     (tags_after_overrides,
      unapplied_overrides) = overrides.ApplyOverrides(error_tags, override_list)
     tags_for_all_osrels.extend(tags_after_overrides)

Modified: csw/mgar/gar/v2/lib/python/checkpkg_lib.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2011-03-28 08:48:23 UTC (rev 13977)
+++ csw/mgar/gar/v2/lib/python/checkpkg_lib.py	2011-03-28 08:49:06 UTC (rev 13978)
@@ -216,7 +216,7 @@
   def Run(self):
     """Runs all the checks
 
-    Returns a tuple of an exit code and a report.
+    Returns a tuple of (exit code, report).
     """
     self._ResetState()
     assert self.sqo_pkgs_list, "The list of packages must not be empty."
@@ -412,6 +412,7 @@
     self.needed_pkgs.append(NeededPackage(pkgname, needed_pkg, reason))
 
   def ReportErrorForPkgname(self, pkgname, tag_name, tag_info=None, msg=None):
+    # TODO: Make this bit use the CheckpkgErrorTag class from models.py
     checkpkg_tag = tag.CheckpkgTag(pkgname, tag_name, tag_info, msg=msg)
     self.AddError(checkpkg_tag)
 

Modified: csw/mgar/gar/v2/lib/python/overrides.py
===================================================================
--- csw/mgar/gar/v2/lib/python/overrides.py	2011-03-28 08:48:23 UTC (rev 13977)
+++ csw/mgar/gar/v2/lib/python/overrides.py	2011-03-28 08:49:06 UTC (rev 13978)
@@ -1,6 +1,12 @@
 # $Id$
 # coding=utf-8
 
+"""Code related to overrides.
+
+The override class is now in the models.py file, because it's one of the
+SQLObject classes, with objects persisted in the database.
+"""
+
 import copy
 import re
 import configuration as c


Property changes on: csw/mgar/gar/v2/lib/python/overrides_test.py
___________________________________________________________________
Added: svn:executable
   + *

Modified: csw/mgar/gar/v2/lib/python/system_pkgmap.py
===================================================================
--- csw/mgar/gar/v2/lib/python/system_pkgmap.py	2011-03-28 08:48:23 UTC (rev 13977)
+++ csw/mgar/gar/v2/lib/python/system_pkgmap.py	2011-03-28 08:49:06 UTC (rev 13978)
@@ -230,6 +230,7 @@
     args = ["uname"]
     if uname_option:
       args.append(uname_option)
+    # TODO: Don't fork during unit tests
     uname_proc = subprocess.Popen(args,
                                   stdout=subprocess.PIPE)
     stdout, stderr = uname_proc.communicate()


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