msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-14 15:36+0100\n"
+"POT-Creation-Date: 2011-11-20 10:47+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"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../python/pakfire/actions.py:148
+#: ../python/pakfire/actions.py:150
#, python-format
msgid "Cannot run scriptlet because no interpreter is available: %s"
msgstr ""
-#: ../python/pakfire/actions.py:152
+#: ../python/pakfire/actions.py:154
#, python-format
msgid "Cannot run scriptlet because the interpreter is not executable: %s"
msgstr ""
-#: ../python/pakfire/actions.py:191
+#: ../python/pakfire/actions.py:193
#, python-format
msgid ""
"The scriptlet returned an error:\n"
"%s"
msgstr ""
-#: ../python/pakfire/actions.py:194
+#: ../python/pakfire/actions.py:196
#, python-format
msgid "The scriptlet ran more than %s seconds and was killed."
msgstr ""
-#: ../python/pakfire/actions.py:249 ../python/pakfire/actions.py:287
-#: ../python/pakfire/actions.py:310 ../python/pakfire/actions.py:333
-#: ../python/pakfire/actions.py:350 ../python/pakfire/actions.py:369
+#: ../python/pakfire/actions.py:251 ../python/pakfire/actions.py:289
+#: ../python/pakfire/actions.py:312 ../python/pakfire/actions.py:335
+#: ../python/pakfire/actions.py:352 ../python/pakfire/actions.py:371
#, python-format
msgid "Running transaction test for %s"
msgstr ""
-#: ../python/pakfire/actions.py:258 ../python/pakfire/actions.py:362
+#: ../python/pakfire/actions.py:260 ../python/pakfire/actions.py:364
msgid "Installing"
msgstr ""
-#: ../python/pakfire/actions.py:296
+#: ../python/pakfire/actions.py:298
msgid "Updating"
msgstr ""
-#: ../python/pakfire/actions.py:316
+#: ../python/pakfire/actions.py:318
msgid "Removing"
msgstr ""
#. Cleaning up leftover files and stuff.
-#: ../python/pakfire/actions.py:340
+#: ../python/pakfire/actions.py:342
msgid "Cleanup"
msgstr ""
-#: ../python/pakfire/actions.py:378
+#: ../python/pakfire/actions.py:380
msgid "Downgrading"
msgstr ""
-#: ../python/pakfire/base.py:205 ../python/pakfire/base.py:235
-#: ../python/pakfire/base.py:281 ../python/pakfire/base.py:332
-#: ../python/pakfire/base.py:398 ../python/pakfire/base.py:437
-#: ../python/pakfire/base.py:490 ../python/pakfire/base.py:510
+#: ../python/pakfire/base.py:207 ../python/pakfire/base.py:237
+#: ../python/pakfire/base.py:283 ../python/pakfire/base.py:334
+#: ../python/pakfire/base.py:400 ../python/pakfire/base.py:439
+#: ../python/pakfire/base.py:492 ../python/pakfire/base.py:512
msgid "Nothing to do"
msgstr ""
-#: ../python/pakfire/base.py:267
+#: ../python/pakfire/base.py:269
msgid "There are no packages to install."
msgstr ""
-#: ../python/pakfire/base.py:322
+#: ../python/pakfire/base.py:324
#, python-format
msgid "Could not find any installed package providing \"%s\"."
msgstr ""
-#: ../python/pakfire/base.py:328
+#: ../python/pakfire/base.py:330
#, python-format
msgid "Multiple reinstall candidates for \"%s\": %s"
msgstr ""
-#: ../python/pakfire/base.py:357
+#: ../python/pakfire/base.py:359
#, python-format
msgid "Could not find package %s in a remote repository."
msgstr ""
-#: ../python/pakfire/base.py:426
+#: ../python/pakfire/base.py:428
#, python-format
msgid "Excluding %s."
msgstr ""
-#: ../python/pakfire/base.py:478
+#: ../python/pakfire/base.py:480
#, python-format
msgid "\"%s\" package does not seem to be installed."
msgstr ""
-#: ../python/pakfire/base.py:622
+#: ../python/pakfire/base.py:624
msgid "Build command has failed."
msgstr ""
-#: ../python/pakfire/base.py:702
+#: ../python/pakfire/base.py:704
msgid "Everything is fine."
msgstr ""
-#: ../python/pakfire/builder.py:122
+#: ../python/pakfire/builder.py:124
msgid "Package information:"
msgstr ""
#. Copy the makefile and load source tarballs.
-#: ../python/pakfire/builder.py:287
+#: ../python/pakfire/builder.py:289
msgid "Extracting"
msgstr ""
-#: ../python/pakfire/builder.py:547
+#: ../python/pakfire/builder.py:549
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:693
+#: ../python/pakfire/builder.py:696
msgid "Creating packages:"
msgstr ""
#. Execute the buildscript of this stage.
-#: ../python/pakfire/builder.py:713
+#: ../python/pakfire/builder.py:716
#, python-format
msgid "Running stage %s:"
msgstr ""
-#: ../python/pakfire/builder.py:731
+#: ../python/pakfire/builder.py:734
#, python-format
msgid "Could not remove static libraries: %s"
msgstr ""
+#: ../python/pakfire/builder.py:740
+msgid "Compressing man pages did not complete successfully."
+msgstr ""
+
#: ../python/pakfire/cli.py:43
msgid "Pakfire command line interface."
msgstr ""
msgid "Give name of at least one package to check."
msgstr ""
-#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:345
+#: ../python/pakfire/cli.py:348 ../python/pakfire/transaction.py:344
msgid "Repository"
msgstr ""
msgstr ""
#: ../python/pakfire/compress.py:133
-#: ../python/pakfire/packages/packager.py:502
+#: ../python/pakfire/packages/packager.py:504
#, python-format
msgid "Compressing %s"
msgstr ""
-#: ../python/pakfire/downloader.py:132
+#: ../python/pakfire/downloader.py:134
msgid "Downloading source files:"
msgstr ""
msgid "Running pakfire-build in a pakfire container?"
msgstr ""
-#: ../python/pakfire/errors.py:85 ../python/pakfire/transaction.py:410
+#: ../python/pakfire/errors.py:85 ../python/pakfire/transaction.py:409
msgid "Transaction test was not successful"
msgstr ""
msgid "%(commas)s and %(last)s"
msgstr ""
-#: ../python/pakfire/packages/base.py:97
+#: ../python/pakfire/packages/base.py:99
msgid "Name"
msgstr ""
-#: ../python/pakfire/packages/base.py:105 ../python/pakfire/transaction.py:344
+#: ../python/pakfire/packages/base.py:107 ../python/pakfire/transaction.py:343
msgid "Arch"
msgstr ""
-#: ../python/pakfire/packages/base.py:108 ../python/pakfire/transaction.py:344
+#: ../python/pakfire/packages/base.py:110 ../python/pakfire/transaction.py:343
msgid "Version"
msgstr ""
-#: ../python/pakfire/packages/base.py:109
+#: ../python/pakfire/packages/base.py:111
msgid "Release"
msgstr ""
-#: ../python/pakfire/packages/base.py:113 ../python/pakfire/transaction.py:345
+#: ../python/pakfire/packages/base.py:115 ../python/pakfire/transaction.py:344
msgid "Size"
msgstr ""
-#: ../python/pakfire/packages/base.py:117
+#: ../python/pakfire/packages/base.py:119
msgid "Repo"
msgstr ""
-#: ../python/pakfire/packages/base.py:120
+#: ../python/pakfire/packages/base.py:122
msgid "Summary"
msgstr ""
-#: ../python/pakfire/packages/base.py:121
+#: ../python/pakfire/packages/base.py:123
msgid "Groups"
msgstr ""
-#: ../python/pakfire/packages/base.py:122
+#: ../python/pakfire/packages/base.py:124
msgid "URL"
msgstr ""
-#: ../python/pakfire/packages/base.py:123
+#: ../python/pakfire/packages/base.py:125
msgid "License"
msgstr ""
-#: ../python/pakfire/packages/base.py:126
+#: ../python/pakfire/packages/base.py:128
msgid "Description"
msgstr ""
-#: ../python/pakfire/packages/base.py:133
+#: ../python/pakfire/packages/base.py:135
msgid "Maintainer"
msgstr ""
-#: ../python/pakfire/packages/base.py:135
+#: ../python/pakfire/packages/base.py:137
msgid "Vendor"
msgstr ""
-#: ../python/pakfire/packages/base.py:137
+#: ../python/pakfire/packages/base.py:139
msgid "UUID"
msgstr ""
-#: ../python/pakfire/packages/base.py:138
+#: ../python/pakfire/packages/base.py:140
msgid "Build ID"
msgstr ""
-#: ../python/pakfire/packages/base.py:139
+#: ../python/pakfire/packages/base.py:141
msgid "Build date"
msgstr ""
-#: ../python/pakfire/packages/base.py:140
+#: ../python/pakfire/packages/base.py:142
msgid "Build host"
msgstr ""
-#: ../python/pakfire/packages/base.py:142
+#: ../python/pakfire/packages/base.py:144
msgid "Provides"
msgstr ""
-#: ../python/pakfire/packages/base.py:147
+#: ../python/pakfire/packages/base.py:149
msgid "Pre-requires"
msgstr ""
-#: ../python/pakfire/packages/base.py:152
+#: ../python/pakfire/packages/base.py:154
msgid "Requires"
msgstr ""
-#: ../python/pakfire/packages/base.py:157
+#: ../python/pakfire/packages/base.py:159
msgid "Conflicts"
msgstr ""
-#: ../python/pakfire/packages/base.py:162
+#: ../python/pakfire/packages/base.py:164
msgid "Obsoletes"
msgstr ""
-#: ../python/pakfire/packages/base.py:170
+#: ../python/pakfire/packages/base.py:172
msgid "File"
msgstr ""
-#: ../python/pakfire/packages/base.py:359
+#: ../python/pakfire/packages/base.py:361
msgid "Not set"
msgstr ""
-#: ../python/pakfire/packages/base.py:498
+#: ../python/pakfire/packages/base.py:500
#, python-format
msgid "Config file saved as %s."
msgstr ""
-#: ../python/pakfire/packages/file.py:95
+#: ../python/pakfire/packages/file.py:97
#, python-format
msgid "Could not extract file: /%(src)s - %(dst)s"
msgstr ""
-#: ../python/pakfire/packages/file.py:145
+#: ../python/pakfire/packages/file.py:147
#, python-format
msgid "Filename: %s"
msgstr ""
-#: ../python/pakfire/packages/file.py:254
+#: ../python/pakfire/packages/file.py:256
#, python-format
msgid "File in archive is missing in file metadata: /%s. Skipping."
msgstr ""
-#: ../python/pakfire/packages/file.py:310
+#: ../python/pakfire/packages/file.py:312
#, python-format
msgid "Config file created as %s"
msgstr ""
-#: ../python/pakfire/packages/file.py:324
+#: ../python/pakfire/packages/file.py:326
#, python-format
msgid "Could not remove file: /%s"
msgstr ""
-#: ../python/pakfire/packages/make.py:75
+#: ../python/pakfire/packages/make.py:77
msgid "Package name is undefined."
msgstr ""
-#: ../python/pakfire/packages/make.py:78
+#: ../python/pakfire/packages/make.py:80
msgid "Package version is undefined."
msgstr ""
#. Load progressbar.
-#: ../python/pakfire/packages/packager.py:340
+#: ../python/pakfire/packages/packager.py:342
msgid "Packaging"
msgstr ""
-#: ../python/pakfire/packages/packager.py:628
+#: ../python/pakfire/packages/packager.py:630
#, python-format
msgid "Building source package %s:"
msgstr ""
-#: ../python/pakfire/repository/database.py:112
+#: ../python/pakfire/repository/database.py:114
msgid "The format of the database is not supported by this version of pakfire."
msgstr ""
-#: ../python/pakfire/repository/database.py:220
+#: ../python/pakfire/repository/database.py:222
#, python-format
msgid "Cannot use database with version greater than %s."
msgstr ""
-#: ../python/pakfire/repository/database.py:222
+#: ../python/pakfire/repository/database.py:224
#, python-format
msgid "Migrating database from format %s to %s."
msgstr ""
-#: ../python/pakfire/repository/index.py:229
+#: ../python/pakfire/repository/index.py:231
#, python-format
msgid ""
"I cannot be forced to re-download the metadata for the repository '%s' when "
"running in offline mode."
msgstr ""
-#: ../python/pakfire/repository/index.py:279
+#: ../python/pakfire/repository/index.py:281
#, python-format
msgid "%s: package database"
msgstr ""
#. Create progress bar.
-#: ../python/pakfire/repository/index.py:367
+#: ../python/pakfire/repository/index.py:369
#, python-format
msgid "Loading from %s"
msgstr ""
#. Add all packages from the database to the index.
-#: ../python/pakfire/repository/index.py:424
+#: ../python/pakfire/repository/index.py:426
msgid "Loading installed packages"
msgstr ""
-#: ../python/pakfire/repository/remote.py:106
+#: ../python/pakfire/repository/remote.py:108
#, python-format
msgid "Cannot download this file in offline mode: %s"
msgstr ""
-#: ../python/pakfire/satsolver.py:157
+#: ../python/pakfire/satsolver.py:158
msgid "The solver returned one problem:"
msgstr ""
#. Ask the user if he or she want to modify the request. If not, just exit.
-#: ../python/pakfire/satsolver.py:173
+#: ../python/pakfire/satsolver.py:174
msgid "Do you want to manually alter the request?"
msgstr ""
-#: ../python/pakfire/satsolver.py:176
+#: ../python/pakfire/satsolver.py:177
msgid "You can now try to satisfy the solver by modifying your request."
msgstr ""
-#: ../python/pakfire/satsolver.py:181
+#: ../python/pakfire/satsolver.py:182
msgid "Which problem to you want to resolve?"
msgstr ""
-#: ../python/pakfire/satsolver.py:183
+#: ../python/pakfire/satsolver.py:184
msgid "Press enter to try to re-solve the request."
msgstr ""
-#: ../python/pakfire/satsolver.py:214
+#: ../python/pakfire/satsolver.py:215
#, python-format
msgid " Solution: %s"
msgstr ""
-#: ../python/pakfire/satsolver.py:223
+#: ../python/pakfire/satsolver.py:224
msgid " Solutions:"
msgstr ""
-#: ../python/pakfire/transaction.py:89
+#: ../python/pakfire/transaction.py:91
#, python-format
msgid "file %s from %s conflicts with file from package %s"
msgstr ""
-#: ../python/pakfire/transaction.py:95
+#: ../python/pakfire/transaction.py:97
#, python-format
msgid "file %s from %s conflicts with files from %s"
msgstr ""
-#: ../python/pakfire/transaction.py:104
+#: ../python/pakfire/transaction.py:106
#, python-format
msgid ""
"There is not enough space left on %(name)s. Need at least %(size)s to "
"perform transaction."
msgstr ""
-#: ../python/pakfire/transaction.py:281
+#: ../python/pakfire/transaction.py:283
#, python-format
msgid "Not enough space to download %s of packages."
msgstr ""
-#: ../python/pakfire/transaction.py:284
+#: ../python/pakfire/transaction.py:286
msgid "Downloading packages:"
msgstr ""
-#: ../python/pakfire/transaction.py:344
+#: ../python/pakfire/transaction.py:343
msgid "Package"
msgstr ""
-#: ../python/pakfire/transaction.py:349
+#: ../python/pakfire/transaction.py:348
msgid "Installing:"
msgstr ""
-#: ../python/pakfire/transaction.py:350
+#: ../python/pakfire/transaction.py:349
msgid "Reinstalling:"
msgstr ""
-#: ../python/pakfire/transaction.py:351
+#: ../python/pakfire/transaction.py:350
msgid "Updating:"
msgstr ""
-#: ../python/pakfire/transaction.py:352
+#: ../python/pakfire/transaction.py:351
msgid "Downgrading:"
msgstr ""
-#: ../python/pakfire/transaction.py:353
+#: ../python/pakfire/transaction.py:352
msgid "Removing:"
msgstr ""
-#: ../python/pakfire/transaction.py:359
+#: ../python/pakfire/transaction.py:358
msgid "Transaction Summary"
msgstr ""
-#: ../python/pakfire/transaction.py:366
+#: ../python/pakfire/transaction.py:365
msgid "package"
msgstr ""
-#: ../python/pakfire/transaction.py:372
+#: ../python/pakfire/transaction.py:371
#, python-format
msgid "Total download size: %s"
msgstr ""
-#: ../python/pakfire/transaction.py:376
+#: ../python/pakfire/transaction.py:375
#, python-format
msgid "Installed size: %s"
msgstr ""
-#: ../python/pakfire/transaction.py:379
+#: ../python/pakfire/transaction.py:378
#, python-format
msgid "Freed size: %s"
msgstr ""
-#: ../python/pakfire/transaction.py:388
+#: ../python/pakfire/transaction.py:387
msgid "Is this okay?"
msgstr ""
-#: ../python/pakfire/transaction.py:391
+#: ../python/pakfire/transaction.py:390
msgid "Running Transaction Test"
msgstr ""
-#: ../python/pakfire/transaction.py:403
+#: ../python/pakfire/transaction.py:402
msgid "Transaction Test Succeeded"
msgstr ""
-#: ../python/pakfire/transaction.py:421
+#: ../python/pakfire/transaction.py:420
msgid "Running transaction"
msgstr ""
-#: ../python/pakfire/util.py:66
+#: ../python/pakfire/util.py:68
#, python-format
msgid "%s [y/N]"
msgstr ""
-#: ../python/pakfire/util.py:252
+#: ../python/pakfire/util.py:254
msgid "Killing orphans..."
msgstr ""
-#: ../python/pakfire/util.py:259
+#: ../python/pakfire/util.py:261
#, python-format
msgid "Process ID %s is still running in chroot. Killing..."
msgstr ""
-#: ../python/pakfire/util.py:271
+#: ../python/pakfire/util.py:273
msgid "Waiting for processes to terminate..."
msgstr ""
# #
###############################################################################
-import logging
import os
import chroot
import packages
import util
+import logging
+log = logging.getLogger("pakfire")
+
from constants import *
from i18n import _
args = {
"cwd" : cwd,
- "logger" : logging.getLogger(),
+ "logger" : log,
"personality" : self.pakfire.distro.personality,
"shell" : False,
"timeout" : SCRIPTLET_TIMEOUT,
return
# Actually run the scriplet.
- logging.debug("Running scriptlet %s" % self)
+ log.debug("Running scriptlet %s" % self)
# Check if the interpreter does exist and is executable.
if self.interpreter:
try:
os.unlink(script_file)
except OSError:
- logging.debug("Could not remove scriptlet file: %s" % script_file)
+ log.debug("Could not remove scriptlet file: %s" % script_file)
class ActionScriptPreIn(ActionScript):
type = "install"
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be installed.
check.install(self.pkg)
self.do(LDCONFIG)
else:
- logging.debug("ldconfig is not present or not executable.")
+ log.debug("ldconfig is not present or not executable.")
class ActionUpdate(Action):
type = "upgrade"
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be updated.
check.update(self.pkg)
assert self.pkg
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be removed.
check.remove(self.pkg)
assert self.pkg
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be removed.
check.cleanup(self.pkg)
type = "reinstall"
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be reinstalled.
check.remove(self.pkg)
type = "downgrade"
def check(self, check):
- logging.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
+ log.debug(_("Running transaction test for %s") % self.pkg.friendly_name)
# Check if this package can be downgraded.
check.install(self.pkg)
# #
###############################################################################
-import logging
import os
import random
import string
import transaction
import util
+import logging
+log = logging.getLogger("pakfire")
+
from constants import *
from i18n import _
if t:
t.dump()
else:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
def install(self, requires, interactive=True, logger=None, **kwargs):
if not logger:
- logger = logging.getLogger()
+ logger = logging.getLogger("pakfire")
# Create a new request.
request = self.create_request()
if not interactive:
raise DependencyError
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
if interactive:
# Break if no packages were added at all.
if not len(repo):
- logging.critical(_("There are no packages to install."))
+ log.critical(_("There are no packages to install."))
return
# Create a new request that installs all solvables from the
# If solving was not possible, we exit here.
if not t:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
if yes is None:
_pkgs.append(pkg)
if not _pkgs:
- logging.warning(_("Could not find any installed package providing \"%s\".") \
+ log.warning(_("Could not find any installed package providing \"%s\".") \
% pattern)
elif len(_pkgs) == 1:
reinstall_pkgs.append(_pkgs[0])
#t.add("reinstall", _pkgs[0])
else:
- logging.warning(_("Multiple reinstall candidates for \"%s\": %s") \
+ log.warning(_("Multiple reinstall candidates for \"%s\": %s") \
% (pattern, ", ".join(p.friendly_name for p in sorted(_pkgs))))
if not reinstall_pkgs:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
# Packages we want to replace.
_pkgs.append(_pkg)
if not _pkgs:
- logging.warning(_("Could not find package %s in a remote repository.") % \
+ log.warning(_("Could not find package %s in a remote repository.") % \
pkg.friendly_name)
else:
# Sort packages to reflect repository priorities, etc...
t.sort()
if not t:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
if not t.cli_yesno():
# Exclude packages that should not be updated.
if excludes:
for exclude in excludes:
- logging.info(_("Excluding %s.") % exclude)
+ log.info(_("Excluding %s.") % exclude)
exclude = self.create_relation(exclude)
request.lock(exclude)
allow_archchange=allow_archchange)
if not t:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
# If we are running in check mode, we return a non-zero value to
# indicate, that there are no updates.
best = pkg
if best is None:
- logging.warning(_("\"%s\" package does not seem to be installed.") % pattern)
+ log.warning(_("\"%s\" package does not seem to be installed.") % pattern)
else:
rel = self.create_relation("%s<%s" % (best.name, best.friendly_version))
request.install(rel)
allow_archchange=allow_archchange)
if not t:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
if not t.cli_yesno():
t = solver.solve(request, uninstall=True)
if not t:
- logging.info(_("Nothing to do"))
+ log.info(_("Nothing to do"))
return
# Ask the user if okay.
return [r for r in self.repos]
def clean_all(self):
- logging.debug("Cleaning up everything...")
+ log.debug("Cleaning up everything...")
# Clean up repository caches.
self.repos.clean()
uninstall=uninstall)
if not t:
- logging.info(_("Everything is fine."))
+ log.info(_("Everything is fine."))
return
# Ask the user if okay.
import fcntl
import grp
-import logging
import math
import os
import re
import repository
import util
+import logging
+log = logging.getLogger("pakfire")
+
from constants import *
from i18n import _
from errors import BuildError, BuildRootLocked, Error
h.setFormatter(f)
else:
# If no logile was given, we use the root logger.
- self.log = logging.getLogger()
+ self.log = logging.getLogger("pakfire")
# Log information about pakfire and some more information, when we
# are running in release mode.
if not os.path.exists(dir_in):
os.makedirs(dir_in)
- logging.debug("%s --> %s" % (file_out, file_in))
+ self.log.debug("%s --> %s" % (file_out, file_in))
shutil.copy2(file_out, file_in)
if not os.path.exists(dir_out):
os.makedirs(dir_out)
- logging.debug("%s --> %s" % (file_in, file_out))
+ self.log.debug("%s --> %s" % (file_in, file_out))
shutil.copy2(file_in, file_out)
self.copyin(i, i)
def _create_node(self, filename, mode, device):
- logging.debug("Create node: %s (%s)" % (filename, mode))
+ self.log.debug("Create node: %s (%s)" % (filename, mode))
filename = self.chrootPath(filename)
os.mknod(filename, mode, device)
def destroy(self):
- logging.debug("Destroying environment %s" % self.path)
+ self.log.debug("Destroying environment %s" % self.path)
if os.path.exists(self.path):
util.rm(self.path)
def cleanup(self):
- logging.debug("Cleaning environemnt.")
+ self.log.debug("Cleaning environemnt.")
# Remove the build directory and buildroot.
dirs = ("build", "result")
if kwargs.has_key("env"):
env.update(kwargs.pop("env"))
- logging.debug("Environment:")
+ self.log.debug("Environment:")
for k, v in sorted(env.items()):
- logging.debug(" %s=%s" % (k, v))
+ self.log.debug(" %s=%s" % (k, v))
# Update personality it none was set
if not personality:
def shell(self, args=[]):
if not util.cli_is_interactive():
- logging.warning("Cannot run shell on non-interactive console.")
+ self.log.warning("Cannot run shell on non-interactive console.")
return
# Install all packages that are needed to run a shell.
# Empty the environment
command = "env -i - %s" % command
- logging.debug("Shell command: %s" % command)
+ self.log.debug("Shell command: %s" % command)
shell = os.system(command)
return os.WEXITSTATUS(shell)
def do(self, command, shell=True, personality=None, cwd=None, *args, **kwargs):
# Environment variables
- logging.debug("Environment:")
+ log.debug("Environment:")
for k, v in sorted(self.environ.items()):
- logging.debug(" %s=%s" % (k, v))
+ log.debug(" %s=%s" % (k, v))
# Update personality it none was set
if not personality:
personality=personality,
shell=False,
env=self.environ,
- logger=logging.getLogger(),
+ logger=logging.getLogger("pakfire"),
cwd=cwd,
*args,
**kwargs
# Package the result.
# Make all these little package from the build environment.
- logging.info(_("Creating packages:"))
+ log.info(_("Creating packages:"))
pkgs = []
for pkg in reversed(self.pkg.packages):
packager = packages.packager.BinaryPackager(self.pakfire, pkg,
self, self.buildroot)
pkg = packager.run(self.resultdir)
pkgs.append(pkg)
- logging.info("")
+ log.info("")
for pkg in sorted(pkgs):
for line in pkg.dump(long=True).splitlines():
- logging.info(line)
- logging.info("")
- logging.info("")
+ log.info(line)
+ log.info("")
+ log.info("")
def build_stage(self, stage):
# Get the buildscript for this stage.
buildscript = self.create_buildscript(stage)
# Execute the buildscript of this stage.
- logging.info(_("Running stage %s:") % stage)
+ log.info(_("Running stage %s:") % stage)
try:
self.do(buildscript, shell=False)
self.do("%s/remove-static-libs %s %s" % \
(SCRIPT_DIR, self.buildroot, " ".join(keep_libs)))
except Error, e:
- logging.warning(_("Could not remove static libraries: %s") % e)
+ log.warning(_("Could not remove static libraries: %s") % e)
def post_compress_man_pages(self):
try:
self.do("%s/compress-man-pages %s" % (SCRIPT_DIR, self.buildroot))
except Error, e:
- logging.warning(_("Compressing man pages did not complete successfully."))
+ log.warning(_("Compressing man pages did not complete successfully."))
def cleanup(self):
if os.path.exists(self.buildroot):
# #
###############################################################################
-import logging
import os
import re
+import logging
+log = logging.getLogger("pakfire")
+
from errors import ConfigError
from repository import Repositories
return self.pakfire.config
def dump(self):
- logging.debug("Distribution configuration:")
+ log.debug("Distribution configuration:")
attrs = ("name", "version", "release", "sname", "dist", "vendor",
"arch", "machine", "source_dl",)
for attr in attrs:
- logging.debug(" %s : %s" % (attr, getattr(self, attr)))
+ log.debug(" %s : %s" % (attr, getattr(self, attr)))
def update(self, config):
if not config:
###############################################################################
import json
-import logging
import os
import random
+import logging
+log = logging.getLogger("pakfire")
+
from config import Config
from urlgrabber.grabber import URLGrabber, URLGrabError
try:
bandwidth_throttle = int(bandwidth_throttle)
except ValueError:
- logging.error("Configuration value for bandwidth_throttle is invalid.")
+ log.error("Configuration value for bandwidth_throttle is invalid.")
bandwidth_throttle = 0
kwargs.update({ "throttle" : bandwidth_throttle })
download_files.append(filename)
if download_files:
- logging.info(_("Downloading source files:"))
+ log.info(_("Downloading source files:"))
# Create source download directory.
if not os.path.exists(SOURCE_CACHE_DIR):
except URLGrabError, e:
raise DownloadError, "%s %s" % (os.path.basename(filename), e)
- logging.info("")
+ log.info("")
return existant_files + download_files
if self.pakfire.offline:
return
- logging.debug("Updating mirrorlist for repository '%s' (force=%s)" % (self.repo.name, force))
+ log.debug("Updating mirrorlist for repository '%s' (force=%s)" % (self.repo.name, force))
cache_filename = "mirrors/mirrorlist"
try:
mirrordata = g.urlread(self.mirrorlist, limit=MIRRORLIST_MAXSIZE)
except URLGrabError, e:
- logging.warning("Could not update the mirrorlist for repo '%s': %s" % (self.repo.name, e))
+ log.warning("Could not update the mirrorlist for repo '%s': %s" % (self.repo.name, e))
return
# XXX check for empty files or damaged output
# #
###############################################################################
-import logging
import time
+import logging
+log = logging.getLogger("pakfire")
+
def setup_logging(config=None):
"""
This function initialized the logger that is enabled immediately.
"""
-
- l = logging.getLogger()
+ l = logging.getLogger("pakfire")
+ l.propagate = 0
if len(l.handlers) > 1:
- logging.debug("Logging was already set up. Don't do this again.")
+ l.debug("Logging was already set up. Don't do this again.")
return
# Remove all previous defined handlers.
###############################################################################
import datetime
-import logging
import os
import shutil
import xml.sax.saxutils
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.util as util
from pakfire.constants import *
# If UUIDs match, the packages are absolutely equal.
if self.uuid == other.uuid:
- #logging.debug("%s is equal to %s by UUID" % (self, other))
+ #log.debug("%s is equal to %s by UUID" % (self, other))
return 0
ret = util.version_compare(self.pakfire.pool,
ret = cmp(self.build_time, other.build_time)
#if ret == 0:
- # logging.debug("%s is equal to %s" % (self, other))
+ # log.debug("%s is equal to %s" % (self, other))
#elif ret < 0:
- # logging.debug("%s is more recent than %s" % (other, self))
+ # log.debug("%s is more recent than %s" % (other, self))
#elif ret > 0:
- # logging.debug("%s is more recent than %s" % (self, other))
+ # log.debug("%s is more recent than %s" % (self, other))
# If no rank could be created, sort by repository priority
if not ret:
i += 1
pb.update(i)
- logging.debug("Removing file: %s" % _file)
+ log.debug("Removing file: %s" % _file)
if prefix:
file = os.path.join(prefix, _file.name[1:])
try:
os.remove(file)
except OSError:
- logging.error("Cannot remove file: %s. Remove manually." % _file)
+ log.error("Cannot remove file: %s. Remove manually." % _file)
# Handle directories.
# Skip removal if the directory is a mountpoint.
# Log all unhandled types.
else:
- logging.warning("Cannot remove file: %s. Filetype is unhandled." % file)
+ log.warning("Cannot remove file: %s. Filetype is unhandled." % file)
if pb:
pb.finish()
for msg in messages:
- logging.warning(msg)
+ log.warning(msg)
###############################################################################
import hashlib
-import logging
import os
import re
import shutil
import tarfile
import tempfile
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.filelist
import pakfire.util as util
import pakfire.compress as compress
# Save capabilities.
caps = util.get_capabilities(name)
if caps:
- logging.debug("Saving capabilities for %s: %s" % (name, caps))
+ log.debug("Saving capabilities for %s: %s" % (name, caps))
tarinfo.pax_headers["PAKFIRE.capabilities"] = caps
# Append the tar header and data to the archive.
try:
tarfile.TarFile.extract(self, member, path)
except OSError, e:
- logging.warning(_("Could not extract file: /%(src)s - %(dst)s") \
+ log.warning(_("Could not extract file: /%(src)s - %(dst)s") \
% { "src" : member.name, "dst" : e, })
if path:
# ...and then apply the capabilities.
caps = member.pax_headers.get("PAKFIRE.capabilities", None)
if caps:
- logging.debug("Restoring capabilities for /%s: %s" % (member.name, caps))
+ log.debug("Restoring capabilities for /%s: %s" % (member.name, caps))
util.set_capabilities(target, caps)
return tarfile.open(self.filename, format=tarfile.PAX_FORMAT)
def extract(self, message=None, prefix=None):
- logging.debug("Extracting package %s" % self.friendly_name)
+ log.debug("Extracting package %s" % self.friendly_name)
if prefix is None:
prefix = ""
payload = archive.extractfile("data.img")
# Decompress the payload if needed.
- logging.debug("Compression: %s" % self.payload_compression)
+ log.debug("Compression: %s" % self.payload_compression)
# Create a temporary file to store the decompressed output.
garbage, tempf = tempfile.mkstemp(prefix="pakfire")
for member in members:
file = name2file.get("/%s" % member.name, None)
if not file:
- logging.warning(_("File in archive is missing in file metadata: /%s. Skipping.") % member.name)
+ log.warning(_("File in archive is missing in file metadata: /%s. Skipping.") % member.name)
continue
# Update progress.
# msg += "/%s link to /%s" % (member.name, member.linkname)
# else:
# msg += "/%s" % member.name
- # logging.debug(msg)
+ # log.debug(msg)
payload_archive.extract(member, path=prefix)
# Print messages.
for msg in messages:
- logging.warning(msg)
+ log.warning(msg)
@property
def metadata(self):
#!/usr/bin/python
-import logging
import os
import re
# #
###############################################################################
-import logging
import os
import re
import shutil
import lexer
import packager
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.chroot as chroot
import pakfire.downloader as downloader
import pakfire.util as util
pb.update(i)
_f = f[dir_len:]
- logging.debug("%s/%s" % (prefix, _f))
+ log.debug("%s/%s" % (prefix, _f))
path = "%s/%s" % (prefix, _f)
import fnmatch
import glob
import hashlib
-import logging
import lzma
import os
import progressbar
import uuid
import zlib
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.compress
import pakfire.util as util
if not os.path.exists(file):
continue
- logging.debug("Removing tmpfile: %s" % file)
+ log.debug("Removing tmpfile: %s" % file)
if os.path.isdir(file):
util.rm(file)
if not arcname:
arcname = os.path.basename(filename)
- logging.debug("Adding %s (as %s) to tarball." % (filename, arcname))
+ log.debug("Adding %s (as %s) to tarball." % (filename, arcname))
self.files.append((arcname, filename))
def create_package_format(self):
datafile = InnerTarFile(datafile)
for m in datafile.getmembers():
- logging.debug(" %s %-8s %-8s %s %6s %s" % \
+ log.debug(" %s %-8s %-8s %s %6s %s" % \
(tarfile.filemode(m.mode), m.uname, m.gname,
"%d-%02d-%02d %02d:%02d:%02d" % time.localtime(m.mtime)[:6],
util.format_size(m.size), m.name))
f.write("\n")
- logging.info("")
+ log.info("")
datafile.close()
f.close()
# Skip orphan directories.
if file in orphan_directories and not os.listdir(file):
- logging.debug("Found an orphaned directory: %s" % file)
+ log.debug("Found an orphaned directory: %s" % file)
continue
files.append(file)
os.makedirs(resultdir)
resultfile = os.path.join(resultdir, self.pkg.package_filename)
- logging.info("Saving package to %s" % resultfile)
+ log.info("Saving package to %s" % resultfile)
try:
os.link(tempfile, resultfile)
except OSError:
def run(self, resultdirs=[]):
assert resultdirs
- logging.info(_("Building source package %s:") % self.pkg.package_filename)
+ log.info(_("Building source package %s:") % self.pkg.package_filename)
# Add datafile to package.
datafile = self.create_datafile()
os.makedirs(resultdir)
resultfile = os.path.join(resultdir, self.pkg.package_filename)
- logging.info("Saving package to %s" % resultfile)
+ log.info("Saving package to %s" % resultfile)
try:
os.link(tempfile, resultfile)
except OSError:
# Dump package information.
pkg = SourcePackage(self.pakfire, self.pakfire.repos.dummy, tempfile)
for line in pkg.dump(long=True).splitlines():
- logging.info(line)
- logging.info("")
+ log.info(line)
+ log.info("")
###############################################################################
import logging
+log = logging.getLogger("pakfire")
import pakfire.packages as packages
try:
del self.__repos[repo.name]
except KeyError:
- logging.debug("Repository that was to be removed does not exist: %s" % repo.name)
+ log.debug("Repository that was to be removed does not exist: %s" % repo.name)
def get_repo(self, name):
"""
pass
def update(self, force=False, offline=False):
- logging.debug("Updating all repository indexes (force=%s)" % force)
+ log.debug("Updating all repository indexes (force=%s)" % force)
# update all indexes if necessary or forced
for repo in self:
yield packages.SolvPackage(self.pakfire, solv)
def clean(self):
- logging.info("Cleaning up all repository caches...")
+ log.info("Cleaning up all repository caches...")
for repo in self:
repo.clean()
import fnmatch
import glob
-import logging
import re
+import logging
+log = logging.getLogger("pakfire")
+
import cache
import pakfire.packages as packages
import pakfire.satsolver as satsolver
self.solver_repo = satsolver.Repo(self.pool, self.name)
self.solver_repo.set_priority(self.priority)
- logging.debug("Initialized new repository: %s" % self)
+ log.debug("Initialized new repository: %s" % self)
# Create an cache object
self.cache = cache.RepositoryCache(self.pakfire, self)
self.solver_repo.set_enabled(val)
if val:
- logging.debug("Enabled repository '%s'." % self.name)
+ log.debug("Enabled repository '%s'." % self.name)
else:
- logging.debug("Disabled repository '%s'." % self.name)
+ log.debug("Disabled repository '%s'." % self.name)
enabled = property(get_enabled, set_enabled)
"""
Cleanup all temporary files of this repository.
"""
- logging.info("Cleaning up repository '%s'..." % self.name)
+ log.info("Cleaning up repository '%s'..." % self.name)
self.cache.destroy()
assert self.index
# #
###############################################################################
-import logging
import os
import random
import shutil
import sqlite3
import time
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.packages as packages
from pakfire.constants import *
def open(self):
if self._db is None:
- logging.debug("Open database %s" % self.filename)
+ log.debug("Open database %s" % self.filename)
dirname = os.path.dirname(self.filename)
if not os.path.exists(dirname):
if self.format > DATABASE_FORMAT:
raise DatabaseError, _("Cannot use database with version greater than %s.") % DATABASE_FORMAT
- logging.info(_("Migrating database from format %s to %s.") % (self.format, DATABASE_FORMAT))
+ log.info(_("Migrating database from format %s to %s.") % (self.format, DATABASE_FORMAT))
# Get a database cursor.
c = self.cursor()
c.close()
def add_package(self, pkg, reason=None):
- logging.debug("Adding package to database: %s" % pkg.friendly_name)
+ log.debug("Adding package to database: %s" % pkg.friendly_name)
c = self.cursor()
c.close()
def rem_package(self, pkg):
- logging.debug("Removing package from database: %s" % pkg.friendly_name)
+ log.debug("Removing package from database: %s" % pkg.friendly_name)
assert pkg.uuid
# #
###############################################################################
-import logging
import os
+import logging
+log = logging.getLogger("pakfire")
+
import database
import metadata
def add_package(self, pkg):
# XXX Skip packages without a UUID
#if not pkg.uuid:
- # logging.warning("Skipping package which lacks UUID: %s" % pkg)
+ # log.warning("Skipping package which lacks UUID: %s" % pkg)
# return
if not pkg.build_time:
return
- logging.debug("Adding package to index %s: %s" % (self, pkg))
+ log.debug("Adding package to index %s: %s" % (self, pkg))
solvable = satsolver.Solvable(self.solver_repo, pkg.name,
pkg.friendly_version, pkg.arch)
age = self.cache.age(filename)
if age and age < TIME_10M:
download = False
- logging.debug("Metadata is recent enough. I don't download it again.")
+ log.debug("Metadata is recent enough. I don't download it again.")
# Open old metadata for comparison.
old_metadata = metadata.Metadata(self.pakfire, self,
# We are supposed to download new metadata, but we are running in
# offline mode. That's okay. Just doing nothing.
if not offline:
- logging.debug("Going to (re-)download the repository metadata.")
+ log.debug("Going to (re-)download the repository metadata.")
# Initialize a grabber for download.
grabber = downloader.MetadataDownloader(self.pakfire)
new_metadata = metadata.Metadata(self.pakfire, self, metadata=data)
if old_metadata and new_metadata < old_metadata:
- logging.warning("The downloaded metadata was less recent than the current one. Trashing that.")
+ log.warning("The downloaded metadata was less recent than the current one. Trashing that.")
else:
# We explicitely rewrite the metadata if it is equal to have
return path
def update(self, force=False, offline=False):
- logging.debug("Updating repository index '%s' (force=%s)" % (self.path, force))
+ log.debug("Updating repository index '%s' (force=%s)" % (self.path, force))
# Do nothing if the update is not forced but populate the database
# if no packages are present.
self.collect_packages(self.path)
def collect_packages(self, path):
- logging.debug("Collecting all packages from %s" % path)
+ log.debug("Collecting all packages from %s" % path)
pkgs = []
# Get a filelist of all files that could possibly be packages.
# Check for binary packages if the architecture matches.
if isinstance(package, packages.BinaryPackage) and \
not package.arch in (self.repo.arch, "noarch"):
- logging.warning("Skipped package with wrong architecture: %s (%s)" \
+ log.warning("Skipped package with wrong architecture: %s (%s)" \
% (package.filename, package.arch))
continue
# #
###############################################################################
-import logging
import os
import shutil
+import logging
+log = logging.getLogger("pakfire")
+
import base
import index
import metadata
del pkg_exists
if copy:
- logging.debug("Copying package '%s' to repository." % pkg)
+ log.debug("Copying package '%s' to repository." % pkg)
repo_dirname = os.path.dirname(repo_filename)
if not os.path.exists(repo_dirname):
os.makedirs(repo_dirname)
# #
###############################################################################
-import logging
import os
+import logging
+log = logging.getLogger("pakfire")
+
import base
import index
# Check if file already exists in cache.
if self.cache.exists(cache_filename):
- logging.debug("File exists in cache: %s" % filename)
+ log.debug("File exists in cache: %s" % filename)
# If the file does already exist, we check if the hash1 matches.
if hash1 and self.cache.verify(cache_filename, hash1):
cache.remove(cache_filename)
if download:
- logging.debug("Going to download %s" % filename)
+ log.debug("Going to download %s" % filename)
# If we are in offline mode, we cannot download any files.
if self.pakfire.offline and not self.url.startswith("file://"):
###############################################################################
import logging
+log = logging.getLogger("pakfire")
import _pakfire
from _pakfire import *
# If no logger was provided, we use the root logger.
if logger is None:
- logger = logging.getLogger()
+ logger = log
# Create a new solver.
solver = _pakfire.Solver(self.pool)
###############################################################################
import hashlib
-import logging
import os
import random
import socket
import time
import xmlrpclib
+import logging
+log = logging.getLogger("pakfire")
+
import pakfire.api
import pakfire.base
import pakfire.config
cmd = "cd %s && git %s" % (path, cmd)
- logging.debug("Running command: %s" % cmd)
+ log.debug("Running command: %s" % cmd)
return subprocess.check_output(["/bin/sh", "-c", cmd])
except xmlrpclib.ProtocolError, e:
# Log all XMLRPC protocol errors.
- logging.error("XMLRPC protocol error:")
- logging.error(" URL: %s" % e.url)
- logging.error(" HTTP headers:")
+ log.error("XMLRPC protocol error:")
+ log.error(" URL: %s" % e.url)
+ log.error(" HTTP headers:")
for header in e.headers.items():
- logging.error(" %s: %s" % header)
- logging.error(" Error code: %s" % e.errcode)
- logging.error(" Error message: %s" % e.errmsg)
+ log.error(" %s: %s" % header)
+ log.error(" Error code: %s" % e.errcode)
+ log.error(" Error message: %s" % e.errmsg)
raise
else:
# If the request was not successful, we wait a little time to try
# it again.
- logging.debug("Request was not successful, we wait a little bit and try it again.")
+ log.debug("Request was not successful, we wait a little bit and try it again.")
time.sleep(30)
tries -= 1
else:
- logging.error("Maximum number of tries was reached. Giving up.")
+ log.error("Maximum number of tries was reached. Giving up.")
# XXX need better exception here.
raise Exception, "Could not fulfill request."
server = self.config._slave.get("server")
- logging.info("Establishing RPC connection to: %s" % server)
+ log.info("Establishing RPC connection to: %s" % server)
self.conn = xmlrpclib.ServerProxy(server, transport=XMLRPCTransport(),
allow_none=True)
break
chunk += 1
- logging.info("Uploading chunk %s/%s of %s." % (chunk, chunks,
+ log.info("Uploading chunk %s/%s of %s." % (chunk, chunks,
os.path.basename(filename)))
data = xmlrpclib.Binary(data)
# #
###############################################################################
-import logging
import os
import progressbar
import sys
import system
import util
+import logging
+log = logging.getLogger("pakfire")
+
from constants import *
from i18n import _
from pakfire._pakfire import sync
pkgs = [f.pkg.friendly_name for f in files]
if len(files) == 2:
- logging.critical(
+ log.critical(
_("file %s from %s conflicts with file from package %s") % \
(name, pkgs[0], pkgs[1])
)
elif len(files) >= 3:
- logging.critical(
+ log.critical(
_("file %s from %s conflicts with files from %s") % \
(name, pkgs[0], i18n.list(pkgs[1:]))
)
continue
print util.format_size(mp.free), util.format_size(mp.disk_usage)
- logging.critical(_("There is not enough space left on %(name)s. Need at least %(size)s to perform transaction.") \
+ log.critical(_("There is not enough space left on %(name)s. Need at least %(size)s to perform transaction.") \
% { "name" : mp.path, "size" : util.format_size(mp.space_needed) })
def load_filelist(self):
raise DownloadError, _("Not enough space to download %s of packages.") \
% util.format_size(download_size)
- logging.info(_("Downloading packages:"))
+ log.info(_("Downloading packages:"))
time_start = time.time()
i = 0
width, height = util.terminal_size()
# Print a nice line.
- logging.info("-" * width)
+ log.info("-" * width)
# Format and calculate download information.
time_stop = time.time()
line = "%s | %5sB %s " % \
(download_speed, download_size, download_time)
line = " " * (width - len(line)) + line
- logging.info(line)
- logging.info("")
+ log.info(line)
+ log.info("")
def dump_pkg(self, pkg):
ret = []
s.append("")
return s
- def dump(self, logger=None):
- if not logger:
- logger = logging.getLogger()
-
+ def dump(self, logger=log):
width = 80
line = "=" * width
return util.ask_user(_("Is this okay?"))
def check(self):
- logging.info(_("Running Transaction Test"))
+ log.info(_("Running Transaction Test"))
# Initialize the check object.
check = TransactionCheck(self.pakfire, self)
raise
if check.successful:
- logging.info(_("Transaction Test Succeeded"))
+ log.info(_("Transaction Test Succeeded"))
return
# In case of an unsuccessful transaction test, we print the error
# Run the transaction test
self.check()
- logging.info(_("Running transaction"))
+ log.info(_("Running transaction"))
# Run all actions in order and catch all kinds of ActionError.
for action in self.actions:
try:
action.run()
except ActionError, e:
- logging.error("Action finished with an error: %s - %s" % (action, e))
+ log.error("Action finished with an error: %s - %s" % (action, e))
- logging.info("")
+ log.info("")
# Call sync to make sure all buffers are written to disk.
sync()
import fcntl
import hashlib
-import logging
import math
import os
import progressbar
import termios
import time
+import logging
+log = logging.getLogger("pakfire")
+
from constants import *
from i18n import _
"""
kill off anything that is still chrooted.
"""
- logging.debug(_("Killing orphans..."))
+ log.debug(_("Killing orphans..."))
killed = False
for fn in [d for d in os.listdir("/proc") if d.isdigit()]:
try:
r = os.readlink("/proc/%s/root" % fn)
if os.path.realpath(root) == os.path.realpath(r):
- logging.warning(_("Process ID %s is still running in chroot. Killing...") % fn)
+ log.warning(_("Process ID %s is still running in chroot. Killing...") % fn)
killed = True
pid = int(fn, 10)
# If something was killed, wait a couple of seconds to make sure all file descriptors
# are closed and we can proceed with umounting the filesystems.
if killed:
- logging.warning(_("Waiting for processes to terminate..."))
+ log.warning(_("Waiting for processes to terminate..."))
time.sleep(3)
# Calling ourself again to make sure all processes were killed.