[Revisor-users] Some questions on comps.xml and kcikstart file

Alexander Todorov atodorov at redhat.com
Thu Nov 22 17:56:55 UTC 2007


Jeroen van Meeuwen wrote:
> Line 118 in revisor/cfg.py (branch master is what you will want to be 
> working on) is a function that does the following:
> 
> 1) If you choose to use the comps file Revisor ships (just some updated 
> comps file), which is off by default (unless you specify 
> --revisor-comps), return the path to that comps file.
> 
> 2) Otherwise, merge the comps files from all the repositories (and clean 
> it up a little so no duplicate categories/groups/packages exist 
> anymore), write that out somewhere and return the path to that newly 
> created comps file.
> 

3) Filter out the resulting comps.xml
See a patch attached to:
https://hosted.fedoraproject.org/projects/revisor/ticket/193
I believe this ticket is the right one.

> Ideally you'd be looking at a command-line switch (say --comps-cleanup) 
> which sets ConfigStore.comps_cleanup to True or False (False by 
> default), adding a third if 3) to ConfigStore.get_comps() to just clean 
> it out (after 2) has been performed). It makes sense to not do two 
> seperate mergers in both 2) and 3), right?


Please review the patch and post your comments. I've tested this with 3 
repos selected and choosing only Base and editors groups. Deps solving 
brings some more packages and I eneded up with comps.xml containing 
merely half of the groups compared to the original one.
I am not in favor adding a command line switch because putting comps.xml 
that lists unavailable packages on the install media will almost always 
result in install errors and confusion. Hence this sounds a good 
candidate to be default behavior.

Some issues that may arise:
- I am building the available packages list at download time. This 
currently doesn't handle source RPMs and I haven't seen comps.xml in any 
repo containing SRC RPMS. That's easy fixable if required.

- I am not handling download errors ATM, as it seems to me that all 
packages are downloaded at once using yum. I don't see (know) a nice and 
simple way to track download errors with the present code except parsing 
error messages (which is ugly). Please advise.

- Maybe generation of available packages list can be moved somewhere 
else (by its own) and implemented with a simple directory listing after 
everything has been downloaded to the temp directory.

- The current implementation adds dependency on libxml2-python

- The logic of excluding groups can be improved. As of now I get an 
empty category Virtualization (no groups there) because of kernel-xen 
package. It's marked as mandatory but no other packages related to 
virtualization are selected. Maybe the criteria for excluding 
groups/categories should change to:
remove all unavailable packages, if there are still packages marked as 
default or optional then don't delete the group. If there are only 
mandatory packages delete the group.
Q: If group is deleted will mandatory packages be installed? (I believe 
yes but I'm not sure).

Greetings,
Alexander.


More information about the Revisor-users mailing list