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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Apr 11 11:17:10 CEST 2011


Revision: 14128
          http://gar.svn.sourceforge.net/gar/?rev=14128&view=rev
Author:   wahwah
Date:     2011-04-11 09:17:10 +0000 (Mon, 11 Apr 2011)

Log Message:
-----------
csw-upload-pkg: Improved screen output

- Logging messages converted to print statements.
- Initial message when starting
- Displaying package counts when checking

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-04-11 09:16:37 UTC (rev 14127)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-04-11 09:17:10 UTC (rev 14128)
@@ -109,6 +109,7 @@
     do_upload = True
     planned_modifications = []
     metadata_by_md5 = {}
+    print "Processing %s file(s). Please wait." % (len(self.filenames),)
     for filename in self.filenames:
       self._ImportMetadata(filename)
       md5_sum = self._GetFileMd5sum(filename)
@@ -171,11 +172,11 @@
       self._RemoveFromCatalog(filename, cat_arch, cat_osrel, file_metadata)
 
   def _RemoveFromCatalog(self, filename, arch, osrel, file_metadata):
-    logging.info("Removing %s (%s %s) from catalog %s %s %s",
-                 file_metadata["catalogname"],
-                 file_metadata["arch"],
-                 file_metadata["osrel"],
-                 DEFAULT_CATREL, arch, osrel)
+    print("Removing %s (%s %s) from catalog %s %s %s"
+          % (file_metadata["catalogname"],
+             file_metadata["arch"],
+             file_metadata["osrel"],
+             DEFAULT_CATREL, arch, osrel))
     md5_sum = self._GetFileMd5sum(filename)
     basename = os.path.basename(filename)
     parsed_basename = opencsw.ParsePackageFileName(basename)
@@ -302,11 +303,11 @@
     logging.debug(
         "_InsertIntoCatalog(%s, %s, %s)",
         repr(arch), repr(osrel), repr(filename))
-    logging.info("Inserting %s (%s %s) into catalog %s %s %s",
-                 file_metadata["catalogname"],
-                 file_metadata["arch"],
-                 file_metadata["osrel"],
-                 DEFAULT_CATREL, arch, osrel)
+    print("Inserting %s (%s %s) into catalog %s %s %s"
+          % (file_metadata["catalogname"],
+             file_metadata["arch"],
+             file_metadata["osrel"],
+             DEFAULT_CATREL, arch, osrel))
     md5_sum = self._GetFileMd5sum(filename)
     basename = os.path.basename(filename)
     parsed_basename = opencsw.ParsePackageFileName(basename)
@@ -472,8 +473,8 @@
       if "5.11" in osrel:
         logging.debug("Skipping Solaris 11 checks")
         continue
-      print ("Checking packages against catalog %s %s %s"
-             % (DEFAULT_CATREL, arch, osrel))
+      print ("Checking %s package(s) against catalog %s %s %s"
+             % (len(checkpkg_sets[(arch, osrel)]), DEFAULT_CATREL, arch, osrel))
       md5_sums = []
       basenames = []
       for filename, md5_sum in checkpkg_sets[(arch, osrel)]:


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