Am Sat, 1 Mar 2014 17:56:01 -0500
schrieb "Michael K. Johnson" <[email protected]>:

> On Sat, Mar 01, 2014 at 10:38:20PM +0100, Foresight wrote:
> > Will try tomorrow to create a group recipe that extracts groups
> > from comp-f20.xml I played a bit with etree. Looks doable even for
> > me.
> 
> Wonderful!  Thanks Mark!
> 
> Don't worry about writing a recipe, really.
> 
> We're using GroupSetRecipe, and all that we need is something that
> gives us mappings from group name to list of package names.  A
> dictionary would make sense:
> 
> mapping = {
>     'groupname1': ('packagenameA', 'packagenameB', ...),
>     'groupname2': ('packagenameB', 'packagenameC', ...),
>     'groupname3': ('packagenameD', 'packagenameE', ...),
>     ...
> }
> 
> In the group, we'll be doing something like:
> 
>     ...
>     allPkgs = ... # load data from an XML file mirrorball writes
>     subGroups = []
>     for groupname in sorted(mapping.keys()):
>         pkgs = allPkgs.findByName('(%s)'
> %('|'.join(mapping[groupname]))) pkgGrp = pks.createGroup('group-' +
> groupname) subGroups.append(pkgGrp)
> 
>     # likely add group-standard based on those since it is a
> consistent # name in conary-wrapped OSes
> 
>     r.Group(subGroups)
I came up with something like
the attached group, but it fails with 
error: /home/mark/conary/src/fedora-20/group-fedora/group-fedora.recipe:26:
 AttributeError: 'list' object has no attribute '_createGroup'

Any hints?

_______________________________________________
Foresight-devel mailing list
[email protected]
https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

Reply via email to