[Yum-devel] Qs regarding YUM code

Creative Innovative innovative_c at yahoo.com
Thu Apr 23 17:28:20 UTC 2009


We are working on a device, that may have to do software update without internet connection, so this is one idea that we are pursuing.
 
Besides, can someone please let me know, regarding my other Qs below::
This can improve run-time performance of YUM.
 

Qs1) In cli.py after running a RPM test transaction. What is the need to create a new transaction, and re-populate ts, for running real RPM transaction. 
Isnt this a performance hit.
Unless, there is any strange RPM side-effect, I think it would be better performance-wise, to just use the same transaction object used for RPM test , for the real transaction.
 
I have cut-paste RELEVANT YUM code below from cli.py.
 
   .....//MY_COMMENTS:: creating ts for RPM Test transaction.
 
        testcb = RPMTransaction(self, test=True)
        self.initActionTs()
...
        self.populateTs(keepold=0) # sigh
        tserrors = self.ts.test(testcb)
   .....

   .....//MY_COMMENTS:: creating NEW ts for real RPM transaction.
 
       self.initActionTs() # make a new, blank ts to populate
        self.populateTs(keepold=0) # populate the ts
        self.ts.check() #required for ordering
        self.ts.order() # order
...
        resultobject = self.runTransaction(cb=cb)

 
 
Thanks,
 
SV
 
 
 
 

--- On Thu, 4/23/09, Seth Vidal <skvidal at fedoraproject.org> wrote:

From: Seth Vidal <skvidal at fedoraproject.org>
Subject: Re: [Yum-devel] Qs regarding YUM code
To: innovative_c at yahoo.com, "yum development" <yum-devel at lists.baseurl.org>
Cc: "James Antill" <james at fedoraproject.org>
Date: Thursday, April 23, 2009, 5:18 PM

On Thu, 23 Apr 2009, Creative Innovative wrote:

> Thanks James.
>  
> Actually I have written a YUM plugin, so that after YUM completes RPM
Transaction Test, I will be calling an api(similar
> to ts_all api in rpmtrans.py), that will dump the transaction file, and
exits YUM.
>  

Why? And why do you want to write a C program to perform the rpm transaction
based on the transaction elements that yum has put together?

There's little, if any, speed boost to implementing the ts.run() in C.

-sv



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20090423/f30381b4/attachment.htm>


More information about the Yum-devel mailing list