[Yum] Generate a List of RPM's

Jitendra Nair jnair at ensim.com
Fri Sep 8 04:16:05 UTC 2006


Hello All ,


Question :  Given a set of required capabilities, come up with a list of 
RPM's  with all the dependencies 
                   resolved . The way I am doing it is , PsuedoCode follows:
                
                   Run setup  code.
                   for cap in capabilities:
                         packages.append ( 
yum.YumBase.returnPackageByDep (cap ) )  
                   for po in packages :
                          yum.tsInfo.addInstall (po)
                   yum.buildTransaction()
                   mems = yum.tsInfo.getMembers()
                   for mem in  mems:
                       From mem.po.returnPackageTuple()  generate the 
rpm file name.
           
                  Am i doing the correct way , if NOT  what would be the 
correct way to do it.
        
                 Thanks a Lot

Regards
Jitendra Nair
Ensim Pune,India     



More information about the Yum mailing list