[yum-cvs] 5 commits - yum/callbacks.py yum/constants.py yum/depsolve.py yum/sqlutils.py yum/transactioninfo.py
James Bowes
jbowes at linux.duke.edu
Thu Nov 15 14:26:52 UTC 2007
yum/callbacks.py | 10 +++++-----
yum/constants.py | 3 +++
yum/depsolve.py | 21 +++++++++++++++++++++
yum/sqlutils.py | 27 ++++++++++++++++++++-------
yum/transactioninfo.py | 5 +++++
5 files changed, 54 insertions(+), 12 deletions(-)
New commits:
commit 27711cf0e34bc2be490e38a5d2de0f2edef483a8
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 09:04:18 2007 -0500
Docstring additions for yum.depsolve
diff --git a/yum/depsolve.py b/yum/depsolve.py
index 0455b09..55f7130 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -14,6 +14,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2005 Duke University
+"""
+Depedancy resolution module for yum.
+"""
+
import os.path
import re
import types
@@ -43,6 +47,11 @@ flags = {"GT": rpm.RPMSENSE_GREATER,
None: 0 }
class Depsolve(object):
+
+ """
+ Dependency resolving class.
+ """
+
def __init__(self):
packages.base = self
self._ts = None
@@ -988,12 +997,24 @@ class DepCheck(object):
self.conflicts.append(confobj)
class Requires(object):
+
+ """
+ A pure data class for holding a package and the list of things it
+ requires.
+ """
+
def __init__(self, pkg,requires):
self.pkg = pkg # po of requiring pkg
self.requires = requires # list of things it requires that are un-closed in the ts
class Conflicts(object):
+
+ """
+ A pure data class for holding a package and the list of things it
+ conflicts.
+ """
+
def __init__(self, pkglist, conflict):
self.pkglist = pkglist # list of conflicting package objects
self.conflict = conflict # what the conflict was between them
commit a0433a8453c21f2c5ba8a34bda53549cb405df8b
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 09:00:06 2007 -0500
Docstring additions for yum.constants
diff --git a/yum/constants.py b/yum/constants.py
index e1c12a9..23e7f27 100644
--- a/yum/constants.py
+++ b/yum/constants.py
@@ -12,6 +12,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+"""
+Yum constants. Usually dealing with rpm magic numbers.
+"""
#Constants
YUM_PID_FILE = '/var/run/yum.pid'
commit 65278577828624aabc3c13c169c0672189f979d3
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 08:58:53 2007 -0500
Docstring additions for yum.transactioninfo
diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
index f914721..29954c8 100644
--- a/yum/transactioninfo.py
+++ b/yum/transactioninfo.py
@@ -20,6 +20,11 @@
# remove the given txmbr and iterate to remove all those in depedent relationships
# with the given txmbr.
+"""
+Classes and functions for manipulating a transaction to be passed
+to rpm.
+"""
+
from constants import *
from packageSack import PackageSack
from packages import YumInstalledPackage
commit f207a1ecc01bee2683cfb5d34205d39022771f71
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 08:57:23 2007 -0500
Docstring additions for yum.sqlutils
diff --git a/yum/sqlutils.py b/yum/sqlutils.py
index d10dc4e..013fdae 100644
--- a/yum/sqlutils.py
+++ b/yum/sqlutils.py
@@ -1,9 +1,4 @@
#!/usr/bin/python -tt
-#
-# utility functions to handle differences in pysqlite versions
-# These are from Wichert Akkerman <wichert at deephackmode.org>'s python-dhm
-# http://www.wiggy.net/code/python-dhm
-#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License
# as published by the Free Software Foundation
@@ -18,6 +13,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2005 Duke University
+"""
+utility functions to handle differences in pysqlite versions
+These are from Wichert Akkerman <wichert at deephackmode.org>'s python-dhm
+http://www.wiggy.net/code/python-dhm
+"""
+
try:
import sqlite3 as sqlite
except ImportError:
@@ -133,7 +134,13 @@ def QmarkToPyformat(query, params):
def executeSQLPyFormat(cursor, query, params=None):
- #print query
+ """
+ Execute a python < 2.5 (external sqlite module) style query.
+
+ @param cursor: A sqlite cursor
+ @param query: The query to execute
+ @param params: An optional list of parameters to the query
+ """
if params is None:
return cursor.execute(query)
@@ -141,7 +148,13 @@ def executeSQLPyFormat(cursor, query, params=None):
return cursor.execute(q, p)
def executeSQLQmark(cursor, query, params=None):
- #print query
+ """
+ Execute a python 2.5 (sqlite3) style query.
+
+ @param cursor: A sqlite cursor
+ @param query: The query to execute
+ @param params: An optional list of parameters to the query
+ """
if params is None:
return cursor.execute(query)
commit bcb6ddbb4f981ed03fe8d1171e266e38b77d4fd8
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 08:51:37 2007 -0500
Indentation fixes for yum.callbacks epydoc
diff --git a/yum/callbacks.py b/yum/callbacks.py
index 15b2b81..7ad25ce 100644
--- a/yum/callbacks.py
+++ b/yum/callbacks.py
@@ -60,10 +60,10 @@ class DownloadBaseCallback( BaseMeter ):
from yum.callbacks import DownloadBaseCallback
class MyDownloadCallback( DownloadBaseCallback ):
-
+
def updateProgress(self,name,frac,fread,ftime):
'''
- Update the progressbar
+ Update the progressbar
@param name: filename
@param frac: Progress fracment (0 -> 1)
@param fread: formated string containing BytesRead
@@ -71,8 +71,8 @@ class DownloadBaseCallback( BaseMeter ):
'''
pct = int( frac*100 )
print " %s : %s " % (name,pct)
-
-
+
+
if __name__ == '__main__':
my = YumBase()
my.doConfigSetup()
@@ -80,7 +80,7 @@ class DownloadBaseCallback( BaseMeter ):
my.repos.repos.setProgressBar( dnlcb )
for pkg in my.pkgSack:
print pkg.name
-
+
"""
def __init__(self):
More information about the Yum-cvs-commits
mailing list