[yum-commits] Branch 'yum-3_2_X' - 3 commits - yum/__init__.py yum/logginglevels.py yummain.py
James Antill
james at osuosl.org
Fri Mar 6 19:28:01 UTC 2009
yum/__init__.py | 21 +++++++++++++++++----
yum/logginglevels.py | 5 +++--
yummain.py | 3 ++-
3 files changed, 22 insertions(+), 7 deletions(-)
New commits:
commit dcd2ffb7c0cc62667983b8bb53171c7d6ca44f28
Author: James Antill <james at and.org>
Date: Fri Mar 6 14:27:30 2009 -0500
Add preconf variables for syslog stuff, add syslog_device
diff --git a/yum/__init__.py b/yum/__init__.py
index 7eb481d..3b9de26 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -97,6 +97,9 @@ class _YumPreBaseConf:
self.errorlevel = None
self.disabled_plugins = None
self.enabled_plugins = None
+ self.syslog_ident = None
+ self.syslog_facility = None
+ self.syslog_device = '/dev/log'
class YumBase(depsolve.Depsolve):
@@ -196,6 +199,9 @@ class YumBase(depsolve.Depsolve):
errorlevel = self.preconf.errorlevel
disabled_plugins = self.preconf.disabled_plugins
enabled_plugins = self.preconf.enabled_plugins
+ syslog_ident = self.preconf.syslog_ident
+ syslog_facility = self.preconf.syslog_facility
+ syslog_device = self.preconf.syslog_device
# We don't want people accessing/altering preconf after it becomes
# worthless. So we delete it, and thus. it'll raise AttributeError
@@ -216,9 +222,14 @@ class YumBase(depsolve.Depsolve):
startupconf.debuglevel = debuglevel
if errorlevel != None:
startupconf.errorlevel = errorlevel
+ if syslog_ident != None:
+ startupconf.syslog_ident = syslog_ident
+ if syslog_facility != None:
+ startupconf.syslog_facility = syslog_facility
self.doLoggingSetup(startupconf.debuglevel, startupconf.errorlevel,
- startupconf.syslog_ident, startupconf.syslog_facility)
+ startupconf.syslog_ident,
+ startupconf.syslog_facility, syslog_device)
if init_plugins and startupconf.plugins:
self.doPluginSetup(optparser, plugin_types, startupconf.pluginpath,
@@ -243,7 +254,8 @@ class YumBase(depsolve.Depsolve):
def doLoggingSetup(self, debuglevel, errorlevel,
- syslog_ident=None, syslog_facility=None):
+ syslog_ident=None, syslog_facility=None,
+ syslog_device='/dev/log'):
'''
Perform logging related setup.
@@ -251,7 +263,8 @@ class YumBase(depsolve.Depsolve):
@param errorlevel: Error logging level to use.
'''
logginglevels.doLoggingSetup(debuglevel, errorlevel,
- syslog_ident, syslog_facility)
+ syslog_ident, syslog_facility,
+ syslog_device)
def doFileLogSetup(self, uid, logfile):
logginglevels.setFileLog(uid, logfile)
diff --git a/yum/logginglevels.py b/yum/logginglevels.py
index 756e47a..6c23f88 100644
--- a/yum/logginglevels.py
+++ b/yum/logginglevels.py
@@ -118,7 +118,8 @@ def setErrorLevel(level):
_added_handlers = False
def doLoggingSetup(debuglevel, errorlevel,
- syslog_ident=None, syslog_facility=None):
+ syslog_ident=None, syslog_facility=None,
+ syslog_device='/dev/log'):
"""
Configure the python logger.
@@ -157,7 +158,7 @@ def doLoggingSetup(debuglevel, errorlevel,
filelogger.setLevel(logging.INFO)
filelogger.propagate = False
- log_dev = '/dev/log'
+ log_dev = syslog_device
global syslog
if os.path.exists(log_dev):
try:
commit 0d5bc8e58f18b7e5fab67ee80f6ac778b60196b7
Author: James Antill <james at and.org>
Date: Thu Mar 5 18:39:35 2009 -0500
Add Seth's favourite command to find rpm problems
diff --git a/yummain.py b/yummain.py
index cb4185b..1224aed 100755
--- a/yummain.py
+++ b/yummain.py
@@ -237,7 +237,8 @@ def main(args):
if not base.conf.skip_broken:
verbose_logger.info(_(" You could try using --skip-broken to work around the problem"))
verbose_logger.info(_(" You could try running: package-cleanup --problems\n"
- " package-cleanup --dupes"))
+ " package-cleanup --dupes\n"
+ " rpm -Va --nofiles --nomd5"))
if unlock(): return 200
return 1
elif result == 2:
commit 94c723cc7c2b5561da2f92d3dd8a3e5d70b22349
Author: James Antill <james at and.org>
Date: Thu Mar 5 10:37:22 2009 -0500
Do a full conflict check for skip broken resolveDeps()
diff --git a/yum/__init__.py b/yum/__init__.py
index e624920..7eb481d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -769,7 +769,7 @@ class YumBase(depsolve.Depsolve):
else:
self.verbose_logger.debug('SKIPBROKEN: resetting already resovled packages (no packages to skip)' )
self.tsInfo.resetResolved(hard=True)
- rescode, restring = self.resolveDeps()
+ rescode, restring = self.resolveDeps(True)
endTs = set(self.tsInfo)
# Check if tsInfo has changes since we started to skip packages
# if there is no changes then we got a loop.
More information about the Yum-commits
mailing list