[yum-cvs] 4 commits - yum/__init__.py yum/config.py yum/packageSack.py yum/packages.py
James Bowes
jbowes at linux.duke.edu
Thu Nov 15 23:45:05 UTC 2007
yum/__init__.py | 3 +++
yum/config.py | 25 +++++++++++++++++++++++++
yum/packageSack.py | 4 ++++
yum/packages.py | 11 +++++++++++
4 files changed, 43 insertions(+)
New commits:
commit 5c955221d62652ec5eeeb1cbd1b4b07f8634e8df
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 17:54:42 2007 -0500
Docstring additions for yum.config
diff --git a/yum/config.py b/yum/config.py
index e4b7c34..174118d 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -15,6 +15,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2002 Duke University
+"""
+Configuration parser and default values for yum.
+"""
+
import os
import warnings
import rpm
@@ -134,6 +138,10 @@ def Inherit(option_obj):
class ListOption(Option):
+ """
+ An option containing a list of strings.
+ """
+
def __init__(self, default=None):
if default is None:
default = []
@@ -210,6 +218,11 @@ class UrlListOption(ListOption):
class IntOption(Option):
+
+ """
+ An option representing an integer value.
+ """
+
def parse(self, s):
try:
return int(s)
@@ -217,6 +230,13 @@ class IntOption(Option):
raise ValueError('invalid integer value')
class BoolOption(Option):
+
+ """
+ An option representing a boolean value.
+
+ The value can be one of 0, 1, yes, no, true, or false.
+ """
+
def parse(self, s):
s = s.lower()
if s in ('0', 'no', 'false'):
@@ -253,6 +273,11 @@ class SelectionOption(Option):
class BytesOption(Option):
+ """
+ An option representing a value in bytes.
+
+ The value may be given in bytes, kilobytes, megabytes, or gigabytes.
+ """
# Multipliers for unit symbols
MULTS = {
'k': 1024,
commit f4ba220386263578b2f5d051a8bc2c85f18a5106
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 17:49:31 2007 -0500
Docstring additions for yum.__init__
diff --git a/yum/__init__.py b/yum/__init__.py
index 69e233b..f9618bc 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -14,6 +14,9 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2005 Duke University
+"""
+The Yum RPM software updater.
+"""
import os
import os.path
commit 2bbca6638d5d5bf3d39861b17987bdd5ab5f0989
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 17:47:08 2007 -0500
Docstring additions for yum.packages
diff --git a/yum/packages.py b/yum/packages.py
index fb7d1b7..900d9a1 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -15,6 +15,10 @@
# Copyright 2004 Duke University
# Written by Seth Vidal <skvidal at phy.duke.edu>
+"""
+Classes and functions dealing with rpm package representations.
+"""
+
import rpm
import os
import os.path
@@ -33,6 +37,9 @@ urlparse.uses_fragment.append("media")
def comparePoEVR(po1, po2):
+ """
+ Compare two PackageEVR objects.
+ """
(e1, v1, r1) = (po1.epoch, po1.version, po1.release)
(e2, v2, r2) = (po2.epoch, po2.version, po2.release)
return rpmUtils.miscutils.compareEVR((e1, v1, r1), (e2, v2, r2))
@@ -353,6 +360,10 @@ class RpmBase(object):
EVR = property(fget=lambda self: self.returnEVR())
class PackageEVR:
+
+ """
+ A comparable epoch, version, and release representation.
+ """
def __init__(self,e,v,r):
self.epoch = e
commit 6660cd175b3191060a8fff0c324b44a5e098bc57
Author: James Bowes <jbowes at redhat.com>
Date: Thu Nov 15 17:42:17 2007 -0500
Docstring additions for yum.packageSack
diff --git a/yum/packageSack.py b/yum/packageSack.py
index 34f8b2e..f150cf3 100644
--- a/yum/packageSack.py
+++ b/yum/packageSack.py
@@ -14,6 +14,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Copyright 2006 Duke University
+"""
+Classes for manipulating and querying groups of packages.
+"""
+
from Errors import PackageSackError
import warnings
import re
More information about the Yum-cvs-commits
mailing list