]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Update more files with new logger.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Nov 2011 10:40:21 +0000 (11:40 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Nov 2011 10:40:21 +0000 (11:40 +0100)
po/pakfire.pot
python/pakfire/config.py
scripts/pakfire-multicall.py

index c077ed50778b44454d59a858afd6e99872144c84..d96c8a9075592163ce4c607dc7a3a406818074f4 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-20 10:47+0100\n"
+"POT-Creation-Date: 2011-11-20 11:27+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -111,37 +111,43 @@ msgstr ""
 msgid "Everything is fine."
 msgstr ""
 
-#: ../python/pakfire/builder.py:124
+#. Log the package information.
+#: ../python/pakfire/builder.py:139
 msgid "Package information:"
 msgstr ""
 
 #. Copy the makefile and load source tarballs.
-#: ../python/pakfire/builder.py:289
+#: ../python/pakfire/builder.py:304
 msgid "Extracting"
 msgstr ""
 
-#: ../python/pakfire/builder.py:549
+#: ../python/pakfire/builder.py:554
+#, python-format
+msgid "Could not find makefile in build root: %s"
+msgstr ""
+
+#: ../python/pakfire/builder.py:567
 msgid "The build command failed. See logfile for details."
 msgstr ""
 
 #. Package the result.
 #. Make all these little package from the build environment.
-#: ../python/pakfire/builder.py:696
+#: ../python/pakfire/builder.py:714
 msgid "Creating packages:"
 msgstr ""
 
 #. Execute the buildscript of this stage.
-#: ../python/pakfire/builder.py:716
+#: ../python/pakfire/builder.py:734
 #, python-format
 msgid "Running stage %s:"
 msgstr ""
 
-#: ../python/pakfire/builder.py:734
+#: ../python/pakfire/builder.py:752
 #, python-format
 msgid "Could not remove static libraries: %s"
 msgstr ""
 
-#: ../python/pakfire/builder.py:740
+#: ../python/pakfire/builder.py:758
 msgid "Compressing man pages did not complete successfully."
 msgstr ""
 
@@ -579,11 +585,11 @@ msgstr ""
 msgid "Could not remove file: /%s"
 msgstr ""
 
-#: ../python/pakfire/packages/make.py:77
+#: ../python/pakfire/packages/make.py:78
 msgid "Package name is undefined."
 msgstr ""
 
-#: ../python/pakfire/packages/make.py:80
+#: ../python/pakfire/packages/make.py:81
 msgid "Package version is undefined."
 msgstr ""
 
@@ -947,28 +953,28 @@ msgid "allow replacement of %s with %s"
 msgstr ""
 
 #. XXX Maybe we can make a more beautiful message here?!
-#: ../scripts/pakfire-multicall.py:23
+#: ../scripts/pakfire-multicall.py:25
 msgid ""
 "There has been an error when trying to import one or more of the modules, "
 "that are required to run Pakfire."
 msgstr ""
 
-#: ../scripts/pakfire-multicall.py:25
+#: ../scripts/pakfire-multicall.py:27
 msgid "Please check your installation of Pakfire."
 msgstr ""
 
-#: ../scripts/pakfire-multicall.py:27
+#: ../scripts/pakfire-multicall.py:29
 msgid "The error that lead to this:"
 msgstr ""
 
-#: ../scripts/pakfire-multicall.py:65
+#: ../scripts/pakfire-multicall.py:67
 msgid "An error has occured when running Pakfire."
 msgstr ""
 
-#: ../scripts/pakfire-multicall.py:68
+#: ../scripts/pakfire-multicall.py:70
 msgid "Error message:"
 msgstr ""
 
-#: ../scripts/pakfire-multicall.py:72
+#: ../scripts/pakfire-multicall.py:74
 msgid "Further description:"
 msgstr ""
index fa89cfb99c2296228d647e3dd08596689107c391..1c9e13be4e9f34eaa1323b50324799e433dd0deb 100644 (file)
 #                                                                             #
 ###############################################################################
 
-import logging
 import os
 
 from ConfigParser import ConfigParser
 
+import logging
+log = logging.getLogger("pakfire")
+
 import base
 
 from constants import *
@@ -50,13 +52,13 @@ class Config(object):
                        self.read(file)
 
        def dump(self):
-               logging.debug("Configuration:")
+               log.debug("Configuration:")
                for k, v in self._config.items():
-                       logging.debug(" %s : %s" % (k, v))
+                       log.debug(" %s : %s" % (k, v))
 
-               logging.debug("Loaded from files:")
+               log.debug("Loaded from files:")
                for f in self._files:
-                       logging.debug(" %s" % f)
+                       log.debug(" %s" % f)
 
        def read(self, filename):
                # If filename does not exist we return silently
@@ -69,7 +71,7 @@ class Config(object):
                if filename in self._files:
                        return
 
-               logging.debug("Reading configuration file: %s" % filename)
+               log.debug("Reading configuration file: %s" % filename)
 
                config = ConfigParser()
                config.read(filename)
@@ -115,7 +117,7 @@ class Config(object):
                return self._config.get(key, default)
 
        def set(self, key, val):
-               logging.debug("Updating configuration parameter: %s = %s" % (key, val))
+               log.debug("Updating configuration parameter: %s = %s" % (key, val))
                self._config[key] = val
 
        def update(self, values):
index b9acc4bbe3946f2098a7a8e53b582958d045e419..864873e779a683e1434603a602d99bbdfbd6353e 100755 (executable)
@@ -1,9 +1,11 @@
 #!/usr/bin/python
 
-import logging
 import os
 import sys
 
+import logging
+log = logging.getLogger("pakfire")
+
 try:
        from pakfire.cli import *
        from pakfire.i18n import _
@@ -56,22 +58,22 @@ try:
        cli.run()
 
 except KeyboardInterrupt:
-       logging.critical("Recieved keyboard interupt (Ctrl-C). Exiting.")
+       log.critical("Recieved keyboard interupt (Ctrl-C). Exiting.")
        ret = 1
 
 # Catch all errors and show a user-friendly error message.
 except Error, e:
-       logging.critical("")
-       logging.critical(_("An error has occured when running Pakfire."))
-       logging.error("")
+       log.critical("")
+       log.critical(_("An error has occured when running Pakfire."))
+       log.error("")
 
-       logging.error(_("Error message:"))
-       logging.error("  %s: %s" % (e.__class__.__name__, e.message))
-       logging.error("")
+       log.error(_("Error message:"))
+       log.error("  %s: %s" % (e.__class__.__name__, e.message))
+       log.error("")
 
-       logging.error(_("Further description:"))
-       logging.error("  %s" % e)
-       logging.error("")
+       log.error(_("Further description:"))
+       log.error("  %s" % e)
+       log.error("")
 
        ret = e.exit_code