seth vidal wrote: > On Fri, 2006-09-08 at 09:50 +0530, Jitendra Nair wrote: > >> Hello All , >> >> Sorry the previous mail lost the formatting . Resending it again . >> >> 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 >> > > what are these "capabilities" you're parsing from and why would you want > to list the package names? > > -sv > > I will try and explain it Again capability == depstring as in "yum install depstring1 depstring2". Given a set of depstring's i need to know the package that provides each depstring and the other packages this package is dependent on. the way i am doing it till now was using 'pexpect' and run the command "yum install depstring1 depstring2 depstring3 ..." and the capture stdout and parse the output and generate the rpms list.Why i am doing this because the build team needs the list for some reason. Now need to do it using the yum api. So i will write the psuedocode again : deplist = [ depstring1 , depstring2 , ...] for depstring in deplist: packages.append ( yum.YumBase.returnPackageByDep ( depstring ) ) for po in packages : yum.tsInfo.addInstall (po) yum.buildTransaction() mems = yum.tsInfo.getMembers() for mem in mems: pkgtuple = mem.po.returnPackageTuple() #From 'pkgtuple' generate filename #save filename. Thank you s.v for the reply . regards Jitendra Nair > _______________________________________________ > Yum mailing list > Yum@xxxxxxxxxxxxxxxxxxxx > https://lists.dulug.duke.edu/mailman/listinfo/yum >