[Yum-devel] [PATCH] Comps clarification

Paul Nasrat pnasrat at redhat.com
Fri Feb 3 19:48:56 UTC 2006


Whilst looking at the new comps format and our current comps.xml we
decided that there is potential ambiguity around how we do things for
language support.

Let me give a walk through of the discussion and our thoughts:

Simple default - all good: <packagereq type="default">bg5ps</packagereq>

Default with requires - these were originally optional but changed to
default to enforce being pulled in.  Both of those are really suboptimal
and we really want them to be pulled in if the requirement is met on the
system/in the tsInfo:

<packagereq type="default" requires="kdelibs">scim-qtimm</packagereq>
<packagereq type="default"
requires="openoffice.org-core">openoffice.org-langpack-zh_CN</packagereq>

Proposed solution:

Take all cases where we use <packagereq ... requires= and create a new
type:

<packagereq type="conditional"
requires="openoffice.org-core">openoffice.org-langpack-cy_GB</packagereq>

This seems clearer and would allow a plugin to evaluate these conditions
and enforce a policy.

Attached is a patch that implement the yum.comps parsing for this
change.  Obviously we'd need to change output.py also.

import yum.comps
c = yum.comps.Comps()
c.read("comps.xml")
g = c.return_group("chinese-support")
 g.conditional_packages.keys()
['kde-i18n-Chinese',
 'scim-pinyin',
 'scim-qtimm',
 'kde-i18n-Chinese-Big5',
 'scim-tables-chinese',
 'openoffice.org-langpack-zh_TW',
 'scim-chewing',
 'openoffice.org-langpack-zh_CN']


Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-2.5-comps-conditional.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20060203/26fe15c5/attachment.bin 


More information about the Yum-devel mailing list