rpms/yum/devel yum-2.5-comps-conditional.patch, NONE, 1.1 yum-2.5-plugin-groups.patch, NONE, 1.1 yum.spec, 1.78, 1.79
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Feb 10 15:22:56 UTC 2006
Author: pnasrat
Update of /cvs/dist/rpms/yum/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv13486
Modified Files:
yum.spec
Added Files:
yum-2.5-comps-conditional.patch yum-2.5-plugin-groups.patch
Log Message:
group work
yum-2.5-comps-conditional.patch:
comps.py | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
--- NEW FILE yum-2.5-comps-conditional.patch ---
--- ./yum/comps.py.condcomps 2006-01-05 00:31:00.000000000 -0500
+++ ./yum/comps.py 2006-02-10 09:42:21.000000000 -0500
@@ -45,6 +45,7 @@
self.mandatory_packages = {}
self.optional_packages = {}
self.default_packages = {}
+ self.conditional_packages = {}
self.langonly = None ## what the hell is this?
self.groupid = None
self.display_order = 1024
@@ -61,7 +62,8 @@
def _packageiter(self):
lst = self.mandatory_packages.keys() + \
self.optional_packages.keys() + \
- self.default_packages.keys()
+ self.default_packages.keys() + \
+ self.conditional_packages.keys()
return lst
@@ -137,7 +139,7 @@
if not type:
type = u'mandatory'
- if type not in ('mandatory', 'default', 'optional'):
+ if type not in ('mandatory', 'default', 'optional', 'conditional'):
raise CompsException
package = child.text
@@ -147,6 +149,10 @@
self.default_packages[package] = 1
elif type == 'optional':
self.optional_packages[package] = 1
+ elif type == 'conditional':
+ self.conditional_packages[package] = child.attrib.get('requires')
+
+
def add(self, obj):
"""Add another group object to this object"""
@@ -160,6 +166,8 @@
self.default_packages[pkg] = 1
for pkg in obj.optional_packages.keys():
self.optional_packages[pkg] = 1
+ for pkg in obj.conditional_packages.keys():
+ self.conditional_packages[pkg] = obj.conditional_packages[pkg]
# name and description translations
for lang in obj.translated_name.keys():
@@ -369,7 +377,7 @@
# optional/default packages installed.
# If so - then the group is installed
else:
- check_pkgs = group.optional_packages.keys() + group.default_packages.keys()
+ check_pkgs = group.optional_packages.keys() + group.default_packages.keys() + group.conditional_packages.keys()
group.installed = False
for pkgname in check_pkgs:
if inst_pkg_names.has_key(pkgname):
yum-2.5-plugin-groups.patch:
plugins.py | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
--- NEW FILE yum-2.5-plugin-groups.patch ---
--- ./yum/plugins.py.plugingrp 2005-12-12 00:51:35.000000000 -0500
+++ ./yum/plugins.py 2006-02-10 09:45:05.000000000 -0500
@@ -82,7 +82,7 @@
# API, the major version number must be incremented and the minor version number
# reset to 0. If a change is made that doesn't break backwards compatibility,
# then the minor number must be incremented.
-API_VERSION = '2.1'
+API_VERSION = '2.2'
# Plugin types
TYPE_CORE = 0
@@ -95,8 +95,8 @@
'init': 'InitPluginConduit',
'predownload': 'DownloadPluginConduit',
'postdownload': 'DownloadPluginConduit',
- 'prereposetup': 'RepoSetupPluginConduit',
- 'postreposetup': 'RepoSetupPluginConduit',
+ 'prereposetup': 'PreRepoSetupPluginConduit',
+ 'postreposetup': 'PostRepoSetupPluginConduit',
'close': 'PluginConduit',
'pretrans': 'MainPluginConduit',
'posttrans': 'MainPluginConduit',
@@ -428,7 +428,7 @@
'''
return self._base.repos
-class RepoSetupPluginConduit(InitPluginConduit):
+class PreRepoSetupPluginConduit(InitPluginConduit):
def getCmdLine(self):
'''Return parsed command line options.
@@ -447,10 +447,20 @@
self._base.doRpmDBSetup()
return self._base.rpmdb
-class DownloadPluginConduit(RepoSetupPluginConduit):
+class PostRepoSetupPluginConduit(PreRepoSetupPluginConduit):
+
+ def getGroups(self):
+ '''Return group information.
+
+ @return: yum.comps.Comps instance
+ '''
+ self._base.doGroupSetup()
+ return self._base.comps
+
+class DownloadPluginConduit(PostRepoSetupPluginConduit):
def __init__(self, parent, base, conf, pkglist, errors=None):
- RepoSetupPluginConduit.__init__(self, parent, base, conf)
+ PostRepoSetupPluginConduit.__init__(self, parent, base, conf)
self._pkglist = pkglist
self._errors = errors
@@ -470,7 +480,7 @@
return {}
return self._errors
-class MainPluginConduit(RepoSetupPluginConduit):
+class MainPluginConduit(PostRepoSetupPluginConduit):
def getPackages(self, repo=None):
if repo:
Index: yum.spec
===================================================================
RCS file: /cvs/dist/rpms/yum/devel/yum.spec,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- yum.spec 3 Feb 2006 20:00:22 -0000 1.78
+++ yum.spec 10 Feb 2006 15:22:54 -0000 1.79
@@ -3,7 +3,7 @@
Summary: RPM installer/updater
Name: yum
Version: 2.5.1
-Release: 4
+Release: 5
License: GPL
Group: System Environment/Base
Source0: http://linux.duke.edu/projects/yum/download/2.5/yum-%{version}.tar.gz
@@ -17,6 +17,8 @@
Patch2: yum-2.5-sortedconstants.patch
Patch3: yum-2.5-sortedtransaction.patch
Patch4: yum-2.5-tsinfo-factory.patch
+Patch5: yum-2.5-plugin-groups.patch
+Patch6: yum-2.5-comps-conditional.patch
URL: http://linux.duke.edu/yum/
BuildArchitectures: noarch
BuildRequires: python
@@ -41,6 +43,8 @@
%patch2 -p0 -b .sortedconstants
%patch3 -p0 -b .sortedtransaction
%patch4 -p0 -b .tsinfofactory
+%patch5 -p0 -b .plugingrp
+%patch6 -p0 -b .condcomps
%build
make
@@ -102,6 +106,9 @@
/usr/lib/yum-plugins/*
%changelog
+* Fri Feb 10 2006 Paul Nasrat <pnasrat at redhat.com> - 2.5.1-5
+- Merge patches from head for group plugin support and conditionals
+
* Fri Feb 03 2006 Paul Nasrat <pnasrat at redhat.com> - 2.5.1-4
- Fix group unselect traceback (cf #177737)
More information about the fedora-cvs-commits
mailing list