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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed Feb 16 17:34:31 CET 2011


Revision: 13336
          http://gar.svn.sourceforge.net/gar/?rev=13336&view=rev
Author:   wahwah
Date:     2011-02-16 16:34:31 +0000 (Wed, 16 Feb 2011)

Log Message:
-----------
csw-upload-pkg: Better on-screen messages

Providing an information about not inserting a package into a specific
catalog.

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

Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-02-16 16:33:58 UTC (rev 13335)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-02-16 16:34:31 UTC (rev 13336)
@@ -159,6 +159,13 @@
         logging.debug("%s %s %s", catrel, arch, osrel)
         srv4_in_catalog = self._rest_client.Srv4ByCatalogAndCatalogname(
             catrel, arch, osrel, catalogname)
+        if srv4_in_catalog:
+          logging.debug("Catalog %s %s contains version %s of the %s package",
+                        arch, osrel, srv4_in_catalog["osrel"], catalogname)
+        else:
+          logging.debug(
+              "Catalog %a %s does not contain any version of the % package.",
+              arch, osrel, catalogname)
         if not srv4_in_catalog or srv4_in_catalog["osrel"] == srv4_osrel:
           # The same architecture as our package, meaning that we can insert
           # the same architecture into the catalog.
@@ -166,11 +173,16 @@
               or (self.os_release and osrel == self.os_release)):
             catalogs.append((catrel, arch, osrel))
         else:
-          if self.os_release and osrel == self.os_release:
-            catalogs.append((catrel, arch, osrel))
           logging.debug(
               "Catalog %s %s %s has another version of %s.",
               catrel, arch, osrel, catalogname)
+          if self.os_release and osrel == self.os_release:
+            logging.debug("OS release specified and matches %s.", osrel)
+            catalogs.append((catrel, arch, osrel))
+          else:
+            logging.info(
+                "Not inserting %s package into %s containing a %s package",
+                srv4_osrel, osrel, srv4_in_catalog["osrel"])
     return tuple(catalogs)
 
   def _UploadFile(self, filename):


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