changeset 5481:df03d0971b5d

Logging nits.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 20 Aug 2009 14:35:30 +0200
parents 60b3a79de083
children 6b5f592edd98
files bin/gub gub/buildrunner.py gub/dependency.py
diffstat 3 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/bin/gub	Wed Aug 19 11:57:17 2009 +0200
+++ b/bin/gub	Thu Aug 20 14:35:30 2009 +0200
@@ -222,7 +222,7 @@
         for spec in list (specs.values()):
             status = spec.get_stamp_file ()
             if os.path.exists (status):
-                logging.info ('Removing status file: %(status)')
+                logging.info ('Removing status file: %(status)s\n' % locals ())
                 os.unlink (status)
 
     # TODO: figure out how to patch src_package from
@@ -333,7 +333,7 @@
 
     logging.default_logger.threshold = options.verbosity
     logging.info ('files: %(files)s\n' % locals ())
-    logging.info ('CLEANED env: ' + str (os.environ))
+    logging.info ('CLEANED env: ' + str (os.environ) + '\n')
 
     if not options.platform and len (files):
         options.platform, x = misc.split_platform (files[0])
--- a/gub/buildrunner.py	Wed Aug 19 11:57:17 2009 +0200
+++ b/gub/buildrunner.py	Thu Aug 20 14:35:30 2009 +0200
@@ -52,7 +52,7 @@
 class BuildRunner:
     def __init__ (self, manager, settings, options, specs):
         info = logging.default_logger.harmless
-        info.write ('MANAGER:' + settings.platform)
+        info.write ('MANAGER: ' + settings.platform + '\n')
         self.managers = {settings.platform : manager }
         self.settings = settings
         self.options = options
@@ -73,7 +73,7 @@
     def manager (self, platform):
         if platform not in self.managers:
             info = logging.default_logger.harmless
-            info.write ('MANAGER for platform' + platform)
+            info.write ('MANAGER for platform: ' + platform + '\n')
             settings = gub.settings.Settings (platform)
             self.managers[platform] = gup.DependencyManager (settings.system_root)
         return self.managers[platform]
--- a/gub/dependency.py	Wed Aug 19 11:57:17 2009 +0200
+++ b/gub/dependency.py	Thu Aug 20 14:35:30 2009 +0200
@@ -115,11 +115,14 @@
         if not self._url:
             self._url = self.build_class ().source
         if not self._url:
-            logging.warning ('no source specified in class:' + self.build_class ().__name__ + '\n')
+            logging.warning ('no source specified in class: '
+                             + self.build_class ().__name__ + '\n')
         if not self._url:
             self._url = self.settings.dependency_url (self.name ())
         if not self._url:
-            raise Exception ('No URL for:' + self._name)
+            raise Exception ('No URL for: '
+                             + misc.with_platform (self._name,
+                                                   self.settings.platform))
         if type (self._url) == str:
             try:
                 self._url = self._url % self.settings.__dict__