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

Alexander Todorov atodorov at redhat.com
Thu Nov 22 12:17:15 UTC 2007


Jeroen van Meeuwen wrote:
  > The code to filter out anything that is not in the package set is 
either
> in anaconda (but I'm not sure if code to 'not show' missing packages is 
> actually useful for writing out an efficient comps file), or hasn't been 
> written (yet).
> 
> Any ideas though on how to filter 'missing' packages out of the comps 
> file are very much welcome.
> 

Here is a quick and simple idea. It probably needs some bug fixing:
1) During RPM download phase generate a list of available packages. This 
is what will end up on the final media and ideally dependencies are 
satisfies (unless something goes wrong)

2) Merge comps.xml files found in all repositories as it is now.
3) For each <group> tag inspect the <packagelist> and <packagereq> tags.
If the listed package is not in the list of downloaded packages then 
remove it from XML.
3) For each <group> if <packagelist> is empty then remove this group 
(adding the id to a reference list)
4) Under <grouphierarchy> tag inspect every <category>.
   4.1) Under the <category> tag inspect every <subcategories>, 
<subcategory> tag. If listing a group id that is already deleted (check 
reference list) then delete this subcategory.
   4.2) If for <category> the <subcategories> tag is an empty list then 
delete this category.
5) Result should be comps.xml containing only description of groups and 
packages only available at install media.

Jeroen is the above useful?
I was asking for reference file/line in Revisor's code where the comps 
merging is performed. I you think the above will work (and I can test 
it) then I am willing to create a patch.

Greetings,
Alexander.


More information about the Revisor-users mailing list