Yum-presto (deltarpms) ready for testing.

Tim Lauridsen tla at rasmil.dk
Tue Mar 27 13:25:08 UTC 2007


seth vidal wrote:
> On Tue, 2007-03-27 at 13:29 +0300, Jonathan Dieter wrote:
>   
>> On Tue, 2007-03-27 at 12:05 +0200, Michael Schroeder wrote:
>>     
>>> On Mon, Mar 26, 2007 at 04:34:21PM -0400, seth vidal wrote:
>>>       
>>>> 1. why are you using md5sum and not sha1sums?
>>>>         
>>> It checks if the md5sum of the file matches the sum from the rpm
>>> header.
>>>
>>> It works basically like this: The "sequence" tells applydeltarpm
>>> which of the files from the rpm header were used to create the
>>> deltarpm and the order of those files (thus the name "sequence"
>>> in case you wondered). makedeltarpm doesn't use all files to
>>> create the delta, config files and files that have the "verify"
>>> bit off get excluded. If you ask applydeltarpm to check if a
>>> deltarpm can be applied it uses this sequence to verify that all
>>> used files are unchanged, either by just checking the size (the
>>> fast method) or by checking the md5sum (like rpm does).
>>> The fast method makes sense if the updater has a fallback to
>>> fetch the complete rpm if applydeltarpm failes, as in most cases
>>> files are unchanged if the size is the same.
>>>
>>> Cheers,
>>>   Michael.
>>>
>>>       
>> And I changed Presto last night to use the full method, rather than the
>> fast method.  Our fallback method is pretty lousy (exiting with an
>> error, working the second time yum is called), at least for the moment.
>>
>>     
>
> Why is that? I need to take a look at the code but there doesn't seem to
> be any reason why it shouldn't be able to fall back to downloading the
> whole package. It knows where it is.
>
> -sv
>
>   
I look at the code, it works in the following way:

postresolve_hook(conduit):
    for each po to be install in TransactionSet:
        check if delta as available.
        make the po point to the delta insted of the full rpm.

normal yum downloading (yum.downloadPkg)

postdownload_hook(conduit):
    for each pkg in the downloadpackages:
          if pkg is a delta:
             try:
                   build the full rpm from the delta
             except:
                   Something is rotten in the state of Denmark, bail out.

if could be changed to:
predownload_hook(conduit,pkglist):
    for each po in pkglist:
        if as delta is available:
            try: 
                download the delta (copy the download code from 
yum.downloadPkgs)  
                build the full rpm.
                set po.pkgtype = 'local' # To make yum skip it in the 
normal download.
             except:
                Something is rotten in the state of Denmark, just leave 
the po unchanged an yum will handle the download as normal.

normal yum downloading (yum.downloadPkg)
   will download all the packages not processed without error, by the 
predownload_hook.

Tim



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20070327/fccf3878/attachment.htm>


More information about the fedora-devel-list mailing list