[yum-cvs] yum/yum comps.py,1.15,1.16

Tim Lauridsen timlau at linux.duke.edu
Tue Mar 20 11:46:18 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv13871/yum

Modified Files:
	comps.py 
Log Message:
Make comps handle situation where comps.xml for  3. part repos dont contains any
name and description tags for groups shared with the base repo, because they what to use the same name and description as set  in the base repo.
If the 3. part repo comps.xml get parsed first, then the group ends up with no name.
This fix solves the problem by merging the names & descriptions.

Index: comps.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/comps.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- comps.py	25 Jan 2007 19:42:11 -0000	1.15
+++ comps.py	20 Mar 2007 11:46:16 -0000	1.16
@@ -171,6 +171,16 @@
         for pkg in obj.conditional_packages.keys():
             self.conditional_packages[pkg] = obj.conditional_packages[pkg]
         
+        # Handle cases where a comps.xml without name & decription tags
+        # has been setup first, so the name & decription for this object is blank.
+            
+        
+        if self.name == '' and obj.name != '':
+            self.name = obj.name
+
+        if self.description == '' and obj.description != '':
+            self.description = obj.description
+            
         # name and description translations
         for lang in obj.translated_name.keys():
             if not self.translated_name.has_key(lang):




More information about the Yum-cvs-commits mailing list