[Yum] yumgengroups.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
 So just out of perl-spite :) - I wrote a yum generate groups in python.

It can be found at:
http://linux.duke.edu/yum/download/misc/yumgengroups.py

 Usage:  yumgengroups.py [options] -g [groupname] -i [groupid] <list of rpms>
       
   Options:
    -c output the complete file - not just the group section
    -v [true or false] - is the group visible to the user or hidden
    -t type of packages(mandatory, default or optional) defaults to mandatory
    --groupreq [groupname] - a group you want included in the group as a
      requirement you may list this option more than one to include multiple
      groups.
    -h, --help this screen
     
so if you ran:
yumgengroups.py -g 'foo group' -i foo -v true --groupreq bar \
   --groupreq baz --groupreq quux file.i386.rpm otherfile.i386.rpm

you'd get back just the groupsection of the yumgroups.xml file.
<group>
   <id>foo</id>
   <uservisible>true</uservisible>
   <name>foo group</name>
   <packagelist>
     <packagereq type="mandatory">file</packagereq>
     <packagereq type="mandatory">otherfile</packagereq>
   </packagelist>
   <grouplist>
     <groupreq>bar</groupreq>
     <groupreq>baz</groupreq>
     <groupreq>quux</groupreq>
   </grouplist>
  </group>


if you add -c you'll get the complete file.

Thanks to Jeff Sheltren for posting a perl program that did the same
thing. Nothing like a little spite to cause you to take action :)

I've also posted Jeff's script at:
http://linux.duke.edu/yum/download/misc/yumgroups.pl


let me know what breaks.

-sv



[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux